[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250109113834.04299a74@bootlin.com>
Date: Thu, 9 Jan 2025 11:38:34 +0100
From: Herve Codina <herve.codina@...tlin.com>
To: Alexander Stein <alexander.stein@...tq-group.com>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>, Neil Armstrong
<neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, Laurent
Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman
<jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>, David Airlie
<airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Marek Vasut <marex@...x.de>,
dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Louis Chauvet <louis.chauvet@...tlin.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v3 3/3] drm: bridge: ti-sn65dsi83: Add error recovery
mechanism
Hi Alexander,
On Wed, 8 Jan 2025 18:44:42 +0100
Herve Codina <herve.codina@...tlin.com> wrote:
> > > #include <drm/drm_atomic_helper.h>
> > > #include <drm/drm_bridge.h>
> > > +#include <drm/drm_drv.h> /* DRM_MODESET_LOCK_ALL_BEGIN() needs drm_drv_uses_atomic_modeset() */
> >
> > Shouldn't this include be added to include/drm/drm_modeset_lock.h instead?
>
> Yes indeed. I will change that in the next iteration.
I tried to add '#include <drm/drm_drv.h>' in include/drm/drm_modeset_lock.h
but it breaks the build in several places.
First, I cannot add it at the begining of drm_modeset_lock.h.
The inclusion path leads to:
drm_modeset_lock.h
drm/drm_drv.h
drm/drm_device.h
drm/drm_mode_config.h
struct drm_mode_config definition
The struct drm_mode_config needs the struct drm_modeset_lock defined.
struct drm_modeset_lock is defined in drm_modeset_lock.h.
Even if I don't like to add include files in the middle of a header filer,
I tried to include drm/drm_drv.h just before the DRM_MODESET_LOCK_ALL_BEGIN()
definition in drm_modeset_lock.h.
This also breaks the build in several places. For instance:
In file included from ./include/drm/drm_modeset_lock.h:162,
from ./include/drm/drm_mode_config.h:32,
from ./include/drm/drm_device.h:9,
from drivers/gpu/drm/drm_dumb_buffers.c:26:
./include/drm/drm_drv.h: In function ‘drm_core_check_all_features’:
./include/drm/drm_drv.h:522:28: error: invalid use of undefined type ‘const struct drm_device’
522 | u32 supported = dev->driver->driver_features & dev->driver_features;
| ^~
I stop here, go back and choose to keep '#include <drm/drm_drv.h>' in ti-sn65dsi83.c
Is that ok for you?
Best regards,
Hervé
Powered by blists - more mailing lists