[PATCH v2 2/2] drm/bridge: drop drmP.h usage

Sam Ravnborg sam at ravnborg.org
Mon May 20 18:06:40 UTC 2019


On Mon, May 20, 2019 at 12:22:35AM +0300, Laurent Pinchart wrote:
> Hi Sam,
> 
> Thank you for the patch.
> 
> On Sun, May 19, 2019 at 08:36:36PM +0200, Sam Ravnborg wrote:
> > Drop use of the deprecated drmP.h header file.
> > 
> > While touching the list of include files:
> > - Divide include files in blocks of linux/* drm/* etc.
> > - Sort individual blocks of include files
> > - Remove duplicated header file
> > 
> > v2:
> > - Be consistent in the order of the include blocks (Laurent)
> > 
> > Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> > Cc: Andrzej Hajda <a.hajda at samsung.com>
> > Cc: Laurent Pinchart <Laurent.pinchart at ideasonboard.com>
> > Cc: David Airlie <airlied at linux.ie>
> > Cc: Daniel Vetter <daniel at ffwll.ch>
> > Cc: Peter Senna Tschudin <peter.senna at gmail.com>
> > Cc: Martin Donnelly <martin.donnelly at ge.com>
> > Cc: Martyn Welch <martyn.welch at collabora.co.uk>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> 
> By the way, on a side note, I came across a neat trick recently to help
> making headers self-contained. By including the header related to a C
> file as the very first header, the compiler will throw an error if the
> header is not self-contained. It would be a bit of an intrusive change
> in DRM, but maybe something to keep in mind.

In some projects I have worked with the rule was to include the most
specific headers first - so we would caugth early if a header file missed
something.

But as long as having all header files self-contained are not a hard
rule we should not try to do something like this.

I once went through all the drm header files to make them minimal and
self-contained.
But this triggered a massive update of all drm drivers / core files
so I skipped that again. The pain/gain ratio was far to high.
Just making them all self-contained is is smaller task that does
not break the build - but until now I have not seen any good reasons /
demands for this so I have left it.

	Sam


More information about the dri-devel mailing list