Re: [PATCH v3 3/3] drm: bridge: ti-sn65dsi83: Add error recovery mechanism

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexander,

On Wed, 8 Jan 2025 18:44:42 +0100
Herve Codina <herve.codina@xxxxxxxxxxx> 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é




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux