[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241017-fearless-terrier-from-avalon-b9769f@houat>
Date: Thu, 17 Oct 2024 14:13:21 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: maarten.lankhorst@...ux.intel.com, tzimmermann@...e.de,
airlied@...il.com, simona@...ll.ch, christian.koenig@....com, ray.huang@....com,
dmitry.baryshkov@...aro.org, dave.stevenson@...pberrypi.com, mcanal@...lia.com,
quic_jjohnson@...cinc.com, skhan@...uxfoundation.org, davidgow@...gle.com,
karolina.stolarek@...el.com, Arunpravin.PaneerSelvam@....com,
thomas.hellstrom@...ux.intel.com, asomalap@....com, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/4] drm/tests: helpers: Add helper for
drm_display_mode_from_cea_vic()
On Thu, Oct 17, 2024 at 09:33:07AM GMT, Jinjie Ruan wrote:
> >> diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h
> >> index e7cc17ee4934..1e7fd4be550c 100644
> >> --- a/include/drm/drm_kunit_helpers.h
> >> +++ b/include/drm/drm_kunit_helpers.h
> >> @@ -4,6 +4,7 @@
> >> #define DRM_KUNIT_HELPERS_H_
> >>
> >> #include <drm/drm_drv.h>
> >> +#include <drm/drm_edid.h>
> >>
> >> #include <linux/device.h>
> >>
> >> @@ -120,4 +121,9 @@ drm_kunit_helper_create_crtc(struct kunit *test,
> >> const struct drm_crtc_funcs *funcs,
> >> const struct drm_crtc_helper_funcs *helper_funcs);
> >>
> >> +struct drm_display_mode *
> >> +drm_kunit_helper_display_mode_from_cea_vic(struct kunit *test,
> >> + struct drm_device *dev,
> >> + u8 video_code);
> >
> > It's not clear to me what you need the drm_edid header, you just return
> > a drm_display_mode pointer so you can just forward declare the structure
>
>
> There is a compile error without the header,because there is no
> "drm_display_mode_from_cea_vic()" declare.
>
> drivers/gpu/drm/tests/drm_kunit_helpers.c:341:16: error: implicit
> declaration of function ‘drm_display_mode_from_cea_vic’; did you mean
> ‘drm_kunit_display_mode_from_cea_vic’?
> [-Werror=implicit-function-declaration]
> 341 | mode = drm_display_mode_from_cea_vic(dev, video_code);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | drm_kunit_display_mode_from_cea_vic
> drivers/gpu/drm/tests/drm_kunit_helpers.c:341:14: warning: assignment to
> ‘struct drm_display_mode *’ from ‘int’ makes pointer from integer
> without a cast [-Wint-conversion]
> 341 | mode = drm_display_mode_from_cea_vic(dev, video_code);
> | ^
Right, but the error is in the C file, not the header.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists