linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found] <20190116163442.12622-1-daniel.vetter@ffwll.ch>
@ 2019-01-16 18:10 ` Sam Ravnborg
  2019-01-17 16:45   ` Daniel Vetter
       [not found]   ` <20190117210334.13234-1-daniel.vetter@ffwll.ch>
  0 siblings, 2 replies; 13+ messages in thread
From: Sam Ravnborg @ 2019-01-16 18:10 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: DRI Development, Jani Nikula, Laurent Pinchart, Rodrigo Vivi,
	Benjamin Gaignard, Jani Nikula, Neil Armstrong,
	Oleksandr Andrushchenko, CK Hu, Alex Deucher, Liviu Dudau,
	Daniel Vetter, linux-arm-kernel, virtualization, etnaviv,
	linux-samsung-soc, intel-gfx, linux-mediatek, linux-amlogic,
	linux-arm-msm, freedreno, nouveau, spice-devel, amd-gfx,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra,
	xen-devel

Hi Daniel.

> v5: Actually try to sort them, and while at it, sort all the ones I
> touch.

Applied this variant on top of drm-misc and did a build test.
Looked good for ia64, x86 and alpha.

Took a closer look at the changes to atmel_hlcd - and they looked OK.

But I noticed that atmel_hlcdc uses only drm_kms_helper_poll_init() and
drm_kms_helper_poll_fini().
But there are no hits on DRM_CONNECTOR_POLL - so I think we maybe
have a driver here where we have plugged the drm_poll infrastructure,
but it is not in use.

>  include/drm/drm_crtc_helper.h                 | 16 -----------

The list of include files in this file could be dropped and replaced by:
struct drm_connector;
struct drm_device;
struct drm_display_mode;
struct drm_encoder;
struct drm_framebuffer;
struct drm_mode_set;
struct drm_modeset_acquire_ctx;

I tried to do so on top of your patch.
But there were too many build errros and I somehow lost the motivation.


>  include/drm/drm_probe_helper.h                | 27 +++++++++++++++++++
This on the other hand is fine - as expected as this is a new file.

But the above is just some random comments so:

Acked-by: Sam Ravnborg <sam@ravnborg.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-16 18:10 ` [PATCH] drm: Split out drm_probe_helper.h Sam Ravnborg
@ 2019-01-17 16:45   ` Daniel Vetter
  2019-01-17 17:45     ` Sam Ravnborg
       [not found]   ` <20190117210334.13234-1-daniel.vetter@ffwll.ch>
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Vetter @ 2019-01-17 16:45 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Daniel Vetter, DRI Development, Jani Nikula, Laurent Pinchart,
	Rodrigo Vivi, Benjamin Gaignard, Jani Nikula, Neil Armstrong,
	Oleksandr Andrushchenko, CK Hu, Alex Deucher, Liviu Dudau,
	Daniel Vetter, linux-arm-kernel, virtualization, etnaviv,
	linux-samsung-soc, intel-gfx, linux-mediatek, linux-amlogic,
	linux-arm-msm, freedreno, nouveau, spice-devel, amd-gfx,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra,
	xen-devel

On Wed, Jan 16, 2019 at 07:10:18PM +0100, Sam Ravnborg wrote:
> Hi Daniel.
> 
> > v5: Actually try to sort them, and while at it, sort all the ones I
> > touch.
> 
> Applied this variant on top of drm-misc and did a build test.
> Looked good for ia64, x86 and alpha.
> 
> Took a closer look at the changes to atmel_hlcd - and they looked OK.
> 
> But I noticed that atmel_hlcdc uses only drm_kms_helper_poll_init() and
> drm_kms_helper_poll_fini().
> But there are no hits on DRM_CONNECTOR_POLL - so I think we maybe
> have a driver here where we have plugged the drm_poll infrastructure,
> but it is not in use.
> 
> >  include/drm/drm_crtc_helper.h                 | 16 -----------
> 
> The list of include files in this file could be dropped and replaced by:
> struct drm_connector;
> struct drm_device;
> struct drm_display_mode;
> struct drm_encoder;
> struct drm_framebuffer;
> struct drm_mode_set;
> struct drm_modeset_acquire_ctx;
> 
> I tried to do so on top of your patch.
> But there were too many build errros and I somehow lost the motivation.

Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
kms drivers. Just removing it from all the atomic drivers caused lots of
fallout, I expect even more if you entirely remove the includes it has.
Maybe a todo, care to pls create that patch since it's your idea?
-Daniel

> 
> 
> >  include/drm/drm_probe_helper.h                | 27 +++++++++++++++++++
> This on the other hand is fine - as expected as this is a new file.
> 
> But the above is just some random comments so:
> 
> Acked-by: Sam Ravnborg <sam@ravnborg.org>

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-17 16:45   ` Daniel Vetter
@ 2019-01-17 17:45     ` Sam Ravnborg
  2019-01-21 22:13       ` Sam Ravnborg
  0 siblings, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2019-01-17 17:45 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Neil Armstrong, Daniel Vetter, Liviu Dudau, DRI Development,
	virtualization, Laurent Pinchart, Daniel Vetter, linux-stm32,
	linux-samsung-soc, Oleksandr Andrushchenko, amd-gfx,
	linux-rockchip, nouveau, spice-devel, Jani Nikula, linux-arm-msm,
	intel-gfx, etnaviv, linux-mediatek, Rodrigo Vivi, linux-tegra,
	linux-amlogic, linux-arm-kernel, xen-devel, linux-renesas-soc,
	Alex Deucher, freedreno

On Thu, Jan 17, 2019 at 05:45:41PM +0100, Daniel Vetter wrote:
> On Wed, Jan 16, 2019 at 07:10:18PM +0100, Sam Ravnborg wrote:
> > Hi Daniel.
> > 
> > > v5: Actually try to sort them, and while at it, sort all the ones I
> > > touch.
> > 
> > Applied this variant on top of drm-misc and did a build test.
> > Looked good for ia64, x86 and alpha.
> > 
> > Took a closer look at the changes to atmel_hlcd - and they looked OK.
> > 
> > But I noticed that atmel_hlcdc uses only drm_kms_helper_poll_init() and
> > drm_kms_helper_poll_fini().
> > But there are no hits on DRM_CONNECTOR_POLL - so I think we maybe
> > have a driver here where we have plugged the drm_poll infrastructure,
> > but it is not in use.
> > 
> > >  include/drm/drm_crtc_helper.h                 | 16 -----------
> > 
> > The list of include files in this file could be dropped and replaced by:
> > struct drm_connector;
> > struct drm_device;
> > struct drm_display_mode;
> > struct drm_encoder;
> > struct drm_framebuffer;
> > struct drm_mode_set;
> > struct drm_modeset_acquire_ctx;
> > 
> > I tried to do so on top of your patch.
> > But there were too many build errros and I somehow lost the motivation.
> 
> Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
> kms drivers. Just removing it from all the atomic drivers caused lots of
> fallout, I expect even more if you entirely remove the includes it has.
> Maybe a todo, care to pls create that patch since it's your idea?

The main reason I bailed out initially was that this would create
small changes to several otherwise seldomly touched files.
And then we would later come and remove drmP.h - so lots of
small but incremental changes to the same otherwise seldomly
edited files.
And the job was only partially done.

I will try to experiment with an approach where I clean up the
include/drm/*.h files a little (like suggested above, +delete drmP.h
and maybe a bit more).

Then to try on a driver by driver basis to make it build with a
cleaned set of include files.
I hope that the cleaned up driver can still build without the
cleaned header files so the changes can be submitted piecemal.

Will do so with an eye on the lesser maintained drivers to try it
out to avoid creating too much chrunch for others.

And if it works out I expect the active drivers to follow the
example.

todo.rst item will wait until I run out of energy.

	Sam


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-17 17:45     ` Sam Ravnborg
@ 2019-01-21 22:13       ` Sam Ravnborg
  2019-01-22  8:03         ` Daniel Vetter
  0 siblings, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2019-01-21 22:13 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Neil Armstrong, Daniel Vetter, Liviu Dudau, DRI Development,
	virtualization, Laurent Pinchart, Daniel Vetter, linux-stm32,
	linux-samsung-soc, Oleksandr Andrushchenko, amd-gfx,
	linux-rockchip, nouveau, spice-devel, Jani Nikula, linux-arm-msm,
	intel-gfx, etnaviv, linux-mediatek, Rodrigo Vivi, linux-tegra,
	linux-amlogic, linux-arm-kernel, xen-devel, linux-renesas-soc,
	Alex Deucher, freedreno

Hi Daniel et al.

> > 
> > Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
> > kms drivers. Just removing it from all the atomic drivers caused lots of
> > fallout, I expect even more if you entirely remove the includes it has.
> > Maybe a todo, care to pls create that patch since it's your idea?
> 
> The main reason I bailed out initially was that this would create
> small changes to several otherwise seldomly touched files.
> And then we would later come and remove drmP.h - so lots of
> small but incremental changes to the same otherwise seldomly
> edited files.
> And the job was only partially done.
> 
> I will try to experiment with an approach where I clean up the
> include/drm/*.h files a little (like suggested above, +delete drmP.h
> and maybe a bit more).
> 
> Then to try on a driver by driver basis to make it build with a
> cleaned set of include files.
> I hope that the cleaned up driver can still build without the
> cleaned header files so the changes can be submitted piecemal.
> 
> Will do so with an eye on the lesser maintained drivers to try it
> out to avoid creating too much chrunch for others.

I have now a few patches queued, but the result is not too pretty.
I did the following:

- For all files in include/drm/*.h the set of include files
  were adjusted to the minimum number of files required to make
  them build without any other files included first.

  Created one .c file for each .h file. Then included the .h
  file and adjusted to the minimal set of include files.
  In the process a lot of forwards were added.

- Deleted drmP.h

- Fixed build of a few drivers: sti, tilcdc, gma500, tve200, via

Some observations:

- Killing all the includes not needed in the headers files
  results in a a lot of extra changes.
  Examples:
    drm_modseset_helper_vtables.h is no longer
    included by anyone, so needs to be added in many files

    drm_atomic_state_helper.h is no longer included
    by anyone so likewise needs to be added in many files

- It is very tedious to do this properly.
  The process I followed was:
  - delete / comment out all include files
  - add back the obvious from a quick scan of the code
  - build - fix - build - fix - build - fix ...
  -   next file...

- The result is errorprone as only the allyesconfig + allmodconfig
  variants are tested. But reallife configurations are more diverse.

Current diffstat:
   111 files changed, 771 insertions(+), 401 deletions(-)

This is for the 5 drivers alone and not the header cleanup.
So long story short - this is not good and not the way forward.

I will try to come up with a few improvements to make the
headers files selfcontained, but restricted to the changes that
add forwards/include to avoid the chrunch in all the drivers.

And then post for review a few patches to clean up some headers.
If the cleanup gets a go I will try to persuade the introduction
of these.
This will include, but will not be limited to, the above mentioned
drm_crtc_helper.h header file.

For now too much time was already spent on this, so it is at the
moment pushed back on my TODO list.
This mail serve also as a kind of "where had I left", when/if I
pick this up again.

If there are anyone that knows some tooling that can help in the
process of adjusting the header files I am all ears.

	Sam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-21 22:13       ` Sam Ravnborg
@ 2019-01-22  8:03         ` Daniel Vetter
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Vetter @ 2019-01-22  8:03 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Neil Armstrong, Liviu Dudau, DRI Development,
	open list:VIRTIO CORE, NET...,
	Laurent Pinchart, Daniel Vetter, linux-stm32, linux-samsung-soc,
	Oleksandr Andrushchenko, amd-gfx list,
	open list:ARM/Rockchip SoC...,
	Nouveau Dev, open list:DRM DRIVER FOR QXL VIRTUAL GPU,
	Jani Nikula, linux-arm-msm, intel-gfx, The etnaviv authors,
	moderated list:ARM/Mediatek SoC support, Rodrigo Vivi,
	linux-tegra, linux-amlogic, Linux ARM, xen-devel,
	open list:DRM DRIVERS FOR RENESAS, Alex Deucher, freedreno

On Mon, Jan 21, 2019 at 11:13 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Daniel et al.
>
> > >
> > > Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
> > > kms drivers. Just removing it from all the atomic drivers caused lots of
> > > fallout, I expect even more if you entirely remove the includes it has.
> > > Maybe a todo, care to pls create that patch since it's your idea?
> >
> > The main reason I bailed out initially was that this would create
> > small changes to several otherwise seldomly touched files.
> > And then we would later come and remove drmP.h - so lots of
> > small but incremental changes to the same otherwise seldomly
> > edited files.
> > And the job was only partially done.
> >
> > I will try to experiment with an approach where I clean up the
> > include/drm/*.h files a little (like suggested above, +delete drmP.h
> > and maybe a bit more).
> >
> > Then to try on a driver by driver basis to make it build with a
> > cleaned set of include files.
> > I hope that the cleaned up driver can still build without the
> > cleaned header files so the changes can be submitted piecemal.
> >
> > Will do so with an eye on the lesser maintained drivers to try it
> > out to avoid creating too much chrunch for others.
>
> I have now a few patches queued, but the result is not too pretty.
> I did the following:
>
> - For all files in include/drm/*.h the set of include files
>   were adjusted to the minimum number of files required to make
>   them build without any other files included first.
>
>   Created one .c file for each .h file. Then included the .h
>   file and adjusted to the minimal set of include files.
>   In the process a lot of forwards were added.
>
> - Deleted drmP.h
>
> - Fixed build of a few drivers: sti, tilcdc, gma500, tve200, via
>
> Some observations:
>
> - Killing all the includes not needed in the headers files
>   results in a a lot of extra changes.
>   Examples:
>     drm_modseset_helper_vtables.h is no longer
>     included by anyone, so needs to be added in many files
>
>     drm_atomic_state_helper.h is no longer included
>     by anyone so likewise needs to be added in many files
>
> - It is very tedious to do this properly.
>   The process I followed was:
>   - delete / comment out all include files
>   - add back the obvious from a quick scan of the code
>   - build - fix - build - fix - build - fix ...
>   -   next file...
>
> - The result is errorprone as only the allyesconfig + allmodconfig
>   variants are tested. But reallife configurations are more diverse.
>
> Current diffstat:
>    111 files changed, 771 insertions(+), 401 deletions(-)
>
> This is for the 5 drivers alone and not the header cleanup.
> So long story short - this is not good and not the way forward.
>
> I will try to come up with a few improvements to make the
> headers files selfcontained, but restricted to the changes that
> add forwards/include to avoid the chrunch in all the drivers.
>
> And then post for review a few patches to clean up some headers.
> If the cleanup gets a go I will try to persuade the introduction
> of these.
> This will include, but will not be limited to, the above mentioned
> drm_crtc_helper.h header file.
>
> For now too much time was already spent on this, so it is at the
> moment pushed back on my TODO list.
> This mail serve also as a kind of "where had I left", when/if I
> pick this up again.
>
> If there are anyone that knows some tooling that can help in the
> process of adjusting the header files I am all ears.

Yeah in the process of splitting up drmP.h we've created a few smaller
such piles of headers. I think in some cases it's just not going to be
worth it to fully split them up, e.g. drm_crtc_helper.h is going to be
a pure legacy helper, only needed by pre-atomic drivers. Splitting
that up doesn't seem to useful to me. Similarly we might want
drm_atomic_helper.h to keep pulling in the other helper headers. So
probably going to be a judgement call on a case-by-case basis.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found]   ` <20190117210334.13234-1-daniel.vetter@ffwll.ch>
@ 2019-01-23 17:00     ` Sam Ravnborg
  2019-01-24  9:46       ` Daniel Vetter
  0 siblings, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2019-01-23 17:00 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: DRI Development, Jani Nikula, Laurent Pinchart, Rodrigo Vivi,
	Benjamin Gaignard, Jani Nikula, Neil Armstrong,
	Oleksandr Andrushchenko, CK Hu, Alex Deucher, Liviu Dudau,
	Daniel Vetter, linux-arm-kernel, virtualization, etnaviv,
	linux-samsung-soc, intel-gfx, linux-mediatek, linux-amlogic,
	linux-arm-msm, freedreno, nouveau, spice-devel, amd-gfx,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra,
	xen-devel

Hi Daniel.

On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
> 
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.

How are the plans to get this patchset merged?
There were dependencies on onging drmP.h removal in i915 IIRC?
I guess my "Minimize drmP.h dependencies" patch-set also have a role in this.

This does not hold up any work of mine, mainly wanted to make
sure this was not lost between all the other patches.

	Sam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-23 17:00     ` Sam Ravnborg
@ 2019-01-24  9:46       ` Daniel Vetter
  2019-01-24 12:39         ` Daniel Vetter
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Vetter @ 2019-01-24  9:46 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Daniel Vetter, DRI Development, Jani Nikula, Laurent Pinchart,
	Rodrigo Vivi, Benjamin Gaignard, Jani Nikula, Neil Armstrong,
	Oleksandr Andrushchenko, CK Hu, Alex Deucher, Liviu Dudau,
	Daniel Vetter, linux-arm-kernel, virtualization, etnaviv,
	linux-samsung-soc, intel-gfx, linux-mediatek, linux-amlogic,
	linux-arm-msm, freedreno, nouveau, spice-devel, amd-gfx,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra,
	xen-devel

On Wed, Jan 23, 2019 at 06:00:15PM +0100, Sam Ravnborg wrote:
> Hi Daniel.
> 
> On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote:
> > Having the probe helper stuff (which pretty much everyone needs) in
> > the drm_crtc_helper.h file (which atomic drivers should never need) is
> > confusing. Split them out.
> > 
> > To make sure I actually achieved the goal here I went through all
> > drivers. And indeed, all atomic drivers are now free of
> > drm_crtc_helper.h includes.
> 
> How are the plans to get this patchset merged?
> There were dependencies on onging drmP.h removal in i915 IIRC?
> I guess my "Minimize drmP.h dependencies" patch-set also have a role in this.

Working on it, a pull request got lost. I originally wanted to get this
all resolved this week, probably going to be next week now :-(
-Daniel


> This does not hold up any work of mine, mainly wanted to make
> sure this was not lost between all the other patches.
> 
> 	Sam

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-24  9:46       ` Daniel Vetter
@ 2019-01-24 12:39         ` Daniel Vetter
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Vetter @ 2019-01-24 12:39 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Daniel Vetter, DRI Development, Jani Nikula, Laurent Pinchart,
	Rodrigo Vivi, Benjamin Gaignard, Jani Nikula, Neil Armstrong,
	Oleksandr Andrushchenko, CK Hu, Alex Deucher, Liviu Dudau,
	Daniel Vetter, linux-arm-kernel, virtualization, etnaviv,
	linux-samsung-soc, intel-gfx, linux-mediatek, linux-amlogic,
	linux-arm-msm, freedreno, nouveau, spice-devel, amd-gfx,
	linux-renesas-soc, linux-rockchip, linux-stm32, linux-tegra,
	xen-devel

On Thu, Jan 24, 2019 at 10:46:47AM +0100, Daniel Vetter wrote:
> On Wed, Jan 23, 2019 at 06:00:15PM +0100, Sam Ravnborg wrote:
> > Hi Daniel.
> > 
> > On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote:
> > > Having the probe helper stuff (which pretty much everyone needs) in
> > > the drm_crtc_helper.h file (which atomic drivers should never need) is
> > > confusing. Split them out.
> > > 
> > > To make sure I actually achieved the goal here I went through all
> > > drivers. And indeed, all atomic drivers are now free of
> > > drm_crtc_helper.h includes.
> > 
> > How are the plans to get this patchset merged?
> > There were dependencies on onging drmP.h removal in i915 IIRC?
> > I guess my "Minimize drmP.h dependencies" patch-set also have a role in this.
> 
> Working on it, a pull request got lost. I originally wanted to get this
> all resolved this week, probably going to be next week now :-(

We're lucky, all sorted now & patch merged. I'm also merging your series,
correctly interleaved.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found] <20190115104137.25695-1-daniel.vetter@ffwll.ch>
                   ` (2 preceding siblings ...)
  2019-01-15 14:30 ` Laurent Pinchart
@ 2019-01-16  3:30 ` Alex Deucher
  3 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2019-01-16  3:30 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics Development, DRI Development,
	open list:VIRTIO CORE, NET...,
	Laurent Pinchart, Benjamin Gaignard, Daniel Vetter, Sam Ravnborg,
	linux-stm32, linux-samsung-soc, amd-gfx list, linux-rockchip,
	nouveau, spice-devel, linux-arm-msm, etnaviv, Jani Nikula,
	linux-mediatek, Rodrigo Vivi, linux-tegra, linux-amlogic,
	linux-arm-kernel, xen-devel, linux-renesas-soc, freedreno

On Tue, Jan 15, 2019 at 5:41 AM Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
>
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
>
> v2: Make it compile. There was so much compile fail on arm drivers
> that I figured I'll better not include any of the acks on v1.
>
> v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
> not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
> there was still one, which this patch largely removes. Which means
> rolling out lots more includes all over.
>
> This will also conflict with ongoing drmP.h cleanup by others I
> expect.
>
> v3: Rebase on top of atomic bochs.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v2)
> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: etnaviv@lists.freedesktop.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: intel-gfx@lists.freedesktop.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: spice-devel@lists.freedesktop.org
> Cc: amd-gfx@lists.freedesktop.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-stm32@st-md-mailman.stormreply.com
> Cc: linux-tegra@vger.kernel.org
> Cc: xen-devel@lists.xen.org
> ---
> Merging this is going to be a bit a mess due to all the ongoing drmP.h
> cleanups. I think the following should work:
> - Apply Sam's prep patches for removing drmP.h from
>   drm_modeset_helper.h
> - Get the i915 drmP.h cleanup backmerged into drm-misc-next
> - Apply this patch.
> - Apply Sam's patch to remove drmP.h from drm_modeset_helper.h
> - All through drm-misc-next, which has some potential for trivial
>   conflicts around #includes with other drivers unfortunately.
>
> I hope there's no other driver who'll blow up accidentally because
> someone else is doing a drmP.h cleanup. Laurent maybe?
>
> Jani, ack on this?
> -Daniel

amdgpu and radeon:
Acked-by: Alex Deucher <alexander.deucher@amd.com>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
  2019-01-15 12:26 ` Neil Armstrong
@ 2019-01-15 14:58   ` Oleksandr Andrushchenko
  0 siblings, 0 replies; 13+ messages in thread
From: Oleksandr Andrushchenko @ 2019-01-15 14:58 UTC (permalink / raw)
  To: Neil Armstrong, Daniel Vetter, Intel Graphics Development
  Cc: freedreno, linux-samsung-soc, amd-gfx, nouveau, linux-arm-msm,
	Rodrigo Vivi, etnaviv, DRI Development, virtualization,
	linux-renesas-soc, linux-rockchip, linux-mediatek,
	Laurent Pinchart, spice-devel, linux-tegra, Daniel Vetter,
	linux-amlogic, xen-devel, Sam Ravnborg, linux-stm32,
	linux-arm-kernel

On 1/15/19 2:26 PM, Neil Armstrong wrote:
> On 15/01/2019 11:41, Daniel Vetter wrote:
>> Having the probe helper stuff (which pretty much everyone needs) in
>> the drm_crtc_helper.h file (which atomic drivers should never need) is
>> confusing. Split them out.
>>
>> To make sure I actually achieved the goal here I went through all
>> drivers. And indeed, all atomic drivers are now free of
>> drm_crtc_helper.h includes.
>>
>> v2: Make it compile. There was so much compile fail on arm drivers
>> that I figured I'll better not include any of the acks on v1.
>>
>> v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
>> not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
>> there was still one, which this patch largely removes. Which means
>> rolling out lots more includes all over.
>>
>> This will also conflict with ongoing drmP.h cleanup by others I
>> expect.
>>
>> v3: Rebase on top of atomic bochs.
>>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v2)
>> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> (v2)
>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: virtualization@lists.linux-foundation.org
>> Cc: etnaviv@lists.freedesktop.org
>> Cc: linux-samsung-soc@vger.kernel.org
>> Cc: intel-gfx@lists.freedesktop.org
>> Cc: linux-mediatek@lists.infradead.org
>> Cc: linux-amlogic@lists.infradead.org
>> Cc: linux-arm-msm@vger.kernel.org
>> Cc: freedreno@lists.freedesktop.org
>> Cc: nouveau@lists.freedesktop.org
>> Cc: spice-devel@lists.freedesktop.org
>> Cc: amd-gfx@lists.freedesktop.org
>> Cc: linux-renesas-soc@vger.kernel.org
>> Cc: linux-rockchip@lists.infradead.org
>> Cc: linux-stm32@st-md-mailman.stormreply.com
>> Cc: linux-tegra@vger.kernel.org
>> Cc: xen-devel@lists.xen.org
>> ---
>> Merging this is going to be a bit a mess due to all the ongoing drmP.h
>> cleanups. I think the following should work:
>> - Apply Sam's prep patches for removing drmP.h from
>>    drm_modeset_helper.h
>> - Get the i915 drmP.h cleanup backmerged into drm-misc-next
>> - Apply this patch.
>> - Apply Sam's patch to remove drmP.h from drm_modeset_helper.h
>> - All through drm-misc-next, which has some potential for trivial
>>    conflicts around #includes with other drivers unfortunately.
>>
>> I hope there's no other driver who'll blow up accidentally because
>> someone else is doing a drmP.h cleanup. Laurent maybe?
>>
>> Jani, ack on this?
>> -Daniel
>> ---
>>   .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  2 +-
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h      |  1 +
>>   .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
>>   .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
>>   .../display/amdgpu_dm/amdgpu_dm_services.c    |  2 +-
>>   drivers/gpu/drm/arc/arcpgu_crtc.c             |  2 +-
>>   drivers/gpu/drm/arc/arcpgu_drv.c              |  2 +-
>>   drivers/gpu/drm/arc/arcpgu_sim.c              |  2 +-
>>   drivers/gpu/drm/arm/hdlcd_crtc.c              |  2 +-
>>   drivers/gpu/drm/arm/hdlcd_drv.c               |  2 +-
>>   drivers/gpu/drm/arm/malidp_crtc.c             |  2 +-
>>   drivers/gpu/drm/arm/malidp_drv.c              |  2 +-
>>   drivers/gpu/drm/arm/malidp_mw.c               |  2 +-
>>   drivers/gpu/drm/armada/armada_510.c           |  2 +-
>>   drivers/gpu/drm/armada/armada_crtc.c          |  2 +-
>>   drivers/gpu/drm/armada/armada_crtc.h          |  2 +
>>   drivers/gpu/drm/armada/armada_drv.c           |  2 +-
>>   drivers/gpu/drm/armada/armada_fb.c            |  2 +-
>>   drivers/gpu/drm/ast/ast_drv.c                 |  1 +
>>   drivers/gpu/drm/ast/ast_mode.c                |  1 +
>>   .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c    |  2 +-
>>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
>>   drivers/gpu/drm/bochs/bochs_drv.c             |  1 +
>>   drivers/gpu/drm/bochs/bochs_kms.c             |  1 +
>>   drivers/gpu/drm/bridge/adv7511/adv7511.h      |  5 +-
>>   drivers/gpu/drm/bridge/analogix-anx78xx.c     |  2 +-
>>   .../drm/bridge/analogix/analogix_dp_core.c    |  2 +-
>>   drivers/gpu/drm/bridge/cdns-dsi.c             |  2 +-
>>   drivers/gpu/drm/bridge/dumb-vga-dac.c         |  2 +-
>>   .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |  2 +-
>>   drivers/gpu/drm/bridge/nxp-ptn3460.c          |  2 +-
>>   drivers/gpu/drm/bridge/panel.c                |  2 +-
>>   drivers/gpu/drm/bridge/parade-ps8622.c        |  2 +-
>>   drivers/gpu/drm/bridge/sii902x.c              |  2 +-
>>   drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  2 +-
>>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
>>   drivers/gpu/drm/bridge/tc358764.c             |  2 +-
>>   drivers/gpu/drm/bridge/tc358767.c             |  2 +-
>>   drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  2 +-
>>   drivers/gpu/drm/bridge/ti-tfp410.c            |  2 +-
>>   drivers/gpu/drm/cirrus/cirrus_drv.c           |  1 +
>>   drivers/gpu/drm/cirrus/cirrus_mode.c          |  1 +
>>   drivers/gpu/drm/drm_atomic_helper.c           |  1 -
>>   drivers/gpu/drm/drm_dp_mst_topology.c         |  2 +-
>>   drivers/gpu/drm/drm_modeset_helper.c          |  2 +-
>>   drivers/gpu/drm/drm_probe_helper.c            |  2 +-
>>   drivers/gpu/drm/drm_simple_kms_helper.c       |  2 +-
>>   drivers/gpu/drm/etnaviv/etnaviv_drv.h         |  1 -
>>   drivers/gpu/drm/exynos/exynos_dp.c            |  3 +-
>>   drivers/gpu/drm/exynos/exynos_drm_crtc.c      |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_dpi.c       |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_drv.c       |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_fb.c        |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_fbdev.c     |  2 +-
>>   drivers/gpu/drm/exynos/exynos_drm_vidi.c      |  2 +-
>>   drivers/gpu/drm/exynos/exynos_hdmi.c          |  2 +-
>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c    |  2 +-
>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c     |  2 +-
>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c     |  2 +-
>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c     |  2 +-
>>   drivers/gpu/drm/gma500/psb_intel_drv.h        |  1 +
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c    |  2 +-
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
>>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
>>   drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |  2 +-
>>   .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c   |  2 +-
>>   .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c   |  2 +-
>>   drivers/gpu/drm/i2c/ch7006_priv.h             |  1 +
>>   drivers/gpu/drm/i2c/sil164_drv.c              |  2 +-
>>   drivers/gpu/drm/i2c/tda998x_drv.c             |  2 +-
>>   drivers/gpu/drm/i915/i915_debugfs.c           |  3 +-
>>   drivers/gpu/drm/i915/i915_drv.c               |  2 +-
>>   drivers/gpu/drm/i915/i915_gem.c               |  2 +
>>   drivers/gpu/drm/i915/i915_ioc32.c             |  1 +
>>   drivers/gpu/drm/i915/i915_irq.c               |  2 +
>>   drivers/gpu/drm/i915/i915_pci.c               |  2 +
>>   drivers/gpu/drm/i915/i915_trace.h             |  2 +
>>   drivers/gpu/drm/i915/intel_crt.c              |  2 +-
>>   drivers/gpu/drm/i915/intel_display.c          |  2 +-
>>   drivers/gpu/drm/i915/intel_dp.c               |  2 +-
>>   drivers/gpu/drm/i915/intel_dp_mst.c           |  2 +-
>>   drivers/gpu/drm/i915/intel_drv.h              |  3 +-
>>   drivers/gpu/drm/i915/intel_fbc.c              |  2 +
>>   drivers/gpu/drm/i915/intel_fbdev.c            |  2 +
>>   drivers/gpu/drm/i915/intel_lpe_audio.c        |  1 +
>>   drivers/gpu/drm/i915/intel_overlay.c          |  2 +
>>   drivers/gpu/drm/imx/dw_hdmi-imx.c             |  2 +-
>>   drivers/gpu/drm/imx/imx-drm-core.c            |  2 +-
>>   drivers/gpu/drm/imx/imx-ldb.c                 |  2 +-
>>   drivers/gpu/drm/imx/imx-tve.c                 |  2 +-
>>   drivers/gpu/drm/imx/ipuv3-crtc.c              |  2 +-
>>   drivers/gpu/drm/imx/parallel-display.c        |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_dpi.c            |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_drm_crtc.c       |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_drm_drv.c        |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_drm_fb.c         |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_dsi.c            |  2 +-
>>   drivers/gpu/drm/mediatek/mtk_hdmi.c           |  2 +-
>>   drivers/gpu/drm/meson/meson_crtc.c            |  2 +-
>>   drivers/gpu/drm/meson/meson_drv.c             |  2 +-
>>   drivers/gpu/drm/meson/meson_dw_hdmi.c         |  2 +-
>>   drivers/gpu/drm/meson/meson_venc_cvbs.c       |  2 +-
> For meson:
>
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
>
>>   drivers/gpu/drm/mgag200/mgag200_mode.c        |  1 +
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  2 +-
>>   drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c   |  2 +-
>>   drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c     |  2 +-
>>   .../gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c  |  2 +-
>>   .../gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c  |  2 +-
>>   .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c |  2 +-
>>   .../gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c  |  2 +-
>>   drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c     |  2 +-
>>   drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c  |  2 +-
>>   drivers/gpu/drm/msm/msm_drv.h                 |  2 +-
>>   drivers/gpu/drm/msm/msm_fb.c                  |  2 +-
>>   drivers/gpu/drm/mxsfb/mxsfb_crtc.c            |  2 +-
>>   drivers/gpu/drm/mxsfb/mxsfb_drv.c             |  2 +-
>>   drivers/gpu/drm/mxsfb/mxsfb_out.c             |  2 +-
>>   drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  1 +
>>   drivers/gpu/drm/nouveau/dispnv50/disp.c       |  2 +-
>>   drivers/gpu/drm/nouveau/nouveau_connector.c   |  1 +
>>   drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
>>   drivers/gpu/drm/omapdrm/omap_connector.c      |  2 +-
>>   drivers/gpu/drm/omapdrm/omap_crtc.c           |  2 +-
>>   drivers/gpu/drm/omapdrm/omap_drv.c            |  2 +-
>>   drivers/gpu/drm/omapdrm/omap_drv.h            |  2 +-
>>   drivers/gpu/drm/omapdrm/omap_encoder.c        |  2 +-
>>   drivers/gpu/drm/omapdrm/omap_fb.c             |  2 +-
>>   drivers/gpu/drm/pl111/pl111_drv.c             |  2 +-
>>   drivers/gpu/drm/qxl/qxl_display.c             |  2 +-
>>   drivers/gpu/drm/qxl/qxl_drv.c                 |  3 +-
>>   drivers/gpu/drm/qxl/qxl_fb.c                  |  2 +-
>>   drivers/gpu/drm/qxl/qxl_kms.c                 |  2 +-
>>   drivers/gpu/drm/radeon/radeon_acpi.c          |  1 +
>>   drivers/gpu/drm/radeon/radeon_connectors.c    |  1 +
>>   drivers/gpu/drm/radeon/radeon_device.c        |  1 +
>>   drivers/gpu/drm/radeon/radeon_display.c       |  1 +
>>   drivers/gpu/drm/radeon/radeon_dp_mst.c        |  1 +
>>   drivers/gpu/drm/radeon/radeon_drv.c           |  1 +
>>   drivers/gpu/drm/radeon/radeon_irq_kms.c       |  1 +
>>   drivers/gpu/drm/rcar-du/rcar_du_crtc.c        |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_du_encoder.c     |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_du_kms.c         |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_du_plane.c       |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_du_vsp.c         |  2 +-
>>   drivers/gpu/drm/rcar-du/rcar_lvds.c           |  2 +-
>>   .../gpu/drm/rockchip/analogix_dp-rockchip.c   |  2 +-
>>   drivers/gpu/drm/rockchip/cdn-dp-core.c        |  2 +-
>>   drivers/gpu/drm/rockchip/cdn-dp-core.h        |  2 +-
>>   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c   |  2 +-
>>   drivers/gpu/drm/rockchip/inno_hdmi.c          |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_fb.c    |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_psr.c   |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_lvds.c      |  2 +-
>>   drivers/gpu/drm/rockchip/rockchip_rgb.c       |  2 +-
>>   drivers/gpu/drm/shmobile/shmob_drm_crtc.c     |  1 +
>>   drivers/gpu/drm/shmobile/shmob_drm_drv.c      |  1 +
>>   drivers/gpu/drm/shmobile/shmob_drm_kms.c      |  1 +
>>   drivers/gpu/drm/sti/sti_crtc.c                |  2 +-
>>   drivers/gpu/drm/sti/sti_drv.c                 |  2 +-
>>   drivers/gpu/drm/sti/sti_dvo.c                 |  2 +-
>>   drivers/gpu/drm/sti/sti_hda.c                 |  2 +-
>>   drivers/gpu/drm/sti/sti_hdmi.c                |  2 +-
>>   drivers/gpu/drm/sti/sti_tvout.c               |  2 +-
>>   drivers/gpu/drm/stm/drv.c                     |  2 +-
>>   drivers/gpu/drm/stm/ltdc.c                    |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_backend.c         |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_crtc.c            |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_drv.c             |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c        |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_lvds.c            |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_rgb.c             |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_tcon.c            |  2 +-
>>   drivers/gpu/drm/sun4i/sun4i_tv.c              |  2 +-
>>   drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c        |  2 +-
>>   drivers/gpu/drm/sun4i/sun8i_mixer.c           |  2 +-
>>   drivers/gpu/drm/sun4i/sun8i_ui_layer.c        |  2 +-
>>   drivers/gpu/drm/sun4i/sun8i_vi_layer.c        |  2 +-
>>   drivers/gpu/drm/tegra/drm.h                   |  2 +-
>>   drivers/gpu/drm/tegra/fb.c                    |  1 +
>>   drivers/gpu/drm/tegra/hdmi.c                  |  2 +-
>>   drivers/gpu/drm/tegra/hub.c                   |  2 +-
>>   drivers/gpu/drm/tilcdc/tilcdc_drv.c           |  1 +
>>   drivers/gpu/drm/tilcdc/tilcdc_drv.h           |  1 -
>>   drivers/gpu/drm/tilcdc/tilcdc_external.c      |  1 +
>>   drivers/gpu/drm/tilcdc/tilcdc_panel.c         |  1 +
>>   drivers/gpu/drm/tilcdc/tilcdc_tfp410.c        |  1 +
>>   drivers/gpu/drm/tinydrm/core/tinydrm-core.c   |  2 +-
>>   drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c   |  2 +-
>>   drivers/gpu/drm/tve200/tve200_drv.c           |  2 +-
>>   drivers/gpu/drm/udl/udl_connector.c           |  1 +
>>   drivers/gpu/drm/udl/udl_drv.c                 |  1 +
>>   drivers/gpu/drm/udl/udl_main.c                |  1 +
>>   drivers/gpu/drm/vc4/vc4_crtc.c                |  2 +-
>>   drivers/gpu/drm/vc4/vc4_dpi.c                 |  2 +-
>>   drivers/gpu/drm/vc4/vc4_dsi.c                 |  2 +-
>>   drivers/gpu/drm/vc4/vc4_hdmi.c                |  2 +-
>>   drivers/gpu/drm/vc4/vc4_kms.c                 |  2 +-
>>   drivers/gpu/drm/vc4/vc4_txp.c                 |  2 +-
>>   drivers/gpu/drm/vc4/vc4_vec.c                 |  2 +-
>>   drivers/gpu/drm/virtio/virtgpu_display.c      |  2 +-
>>   drivers/gpu/drm/virtio/virtgpu_drv.h          |  2 +-
>>   drivers/gpu/drm/vkms/vkms_crtc.c              |  2 +-
>>   drivers/gpu/drm/vkms/vkms_drv.c               |  2 +-
>>   drivers/gpu/drm/vkms/vkms_output.c            |  2 +-
>>   drivers/gpu/drm/vmwgfx/vmwgfx_kms.h           |  2 +-
>>   drivers/gpu/drm/xen/xen_drm_front.c           |  2 +-
>>   drivers/gpu/drm/xen/xen_drm_front_conn.c      |  2 +-
>>   drivers/gpu/drm/xen/xen_drm_front_gem.c       |  2 +-
>>   drivers/gpu/drm/xen/xen_drm_front_kms.c       |  2 +-
For Xen:
Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>   drivers/gpu/drm/zte/zx_drm_drv.c              |  2 +-
>>   drivers/gpu/drm/zte/zx_hdmi.c                 |  2 +-
>>   drivers/gpu/drm/zte/zx_tvenc.c                |  2 +-
>>   drivers/gpu/drm/zte/zx_vga.c                  |  2 +-
>>   drivers/gpu/drm/zte/zx_vou.c                  |  2 +-
>>   drivers/staging/vboxvideo/vbox_irq.c          |  4 +-
>>   drivers/staging/vboxvideo/vbox_mode.c         |  2 +-
>>   include/drm/drm_crtc_helper.h                 | 16 ------
>>   include/drm/drm_probe_helper.h                | 50 +++++++++++++++++++
>>   227 files changed, 289 insertions(+), 200 deletions(-)
>>   create mode 100644 include/drm/drm_probe_helper.h
>>
> [...]
>
>> diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
>> index 75d97f1b2e8f..ec573c04206b 100644
>> --- a/drivers/gpu/drm/meson/meson_crtc.c
>> +++ b/drivers/gpu/drm/meson/meson_crtc.c
>> @@ -30,7 +30,7 @@
>>   #include <drm/drm_atomic.h>
>>   #include <drm/drm_atomic_helper.h>
>>   #include <drm/drm_flip_work.h>
>> -#include <drm/drm_crtc_helper.h>
>> +#include <drm/drm_probe_helper.h>
>>   
>>   #include "meson_crtc.h"
>>   #include "meson_plane.h"
>> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
>> index 1f2cf27ecb24..09e67a9cf678 100644
>> --- a/drivers/gpu/drm/meson/meson_drv.c
>> +++ b/drivers/gpu/drm/meson/meson_drv.c
>> @@ -31,7 +31,7 @@
>>   #include <drm/drm_atomic.h>
>>   #include <drm/drm_atomic_helper.h>
>>   #include <drm/drm_flip_work.h>
>> -#include <drm/drm_crtc_helper.h>
>> +#include <drm/drm_probe_helper.h>
>>   #include <drm/drm_plane_helper.h>
>>   #include <drm/drm_gem_cma_helper.h>
>>   #include <drm/drm_gem_framebuffer_helper.h>
>> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> index bc25001b8207..a6165b1a564d 100644
>> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> @@ -27,7 +27,7 @@
>>   
>>   #include <drm/drmP.h>
>>   #include <drm/drm_edid.h>
>> -#include <drm/drm_crtc_helper.h>
>> +#include <drm/drm_probe_helper.h>
>>   #include <drm/drm_atomic_helper.h>
>>   #include <drm/bridge/dw_hdmi.h>
>>   
>> diff --git a/drivers/gpu/drm/meson/meson_venc_cvbs.c b/drivers/gpu/drm/meson/meson_venc_cvbs.c
>> index f7945bae3b4a..64de3a7026d0 100644
>> --- a/drivers/gpu/drm/meson/meson_venc_cvbs.c
>> +++ b/drivers/gpu/drm/meson/meson_venc_cvbs.c
>> @@ -27,7 +27,7 @@
>>   
>>   #include <drm/drmP.h>
>>   #include <drm/drm_edid.h>
>> -#include <drm/drm_crtc_helper.h>
>> +#include <drm/drm_probe_helper.h>
>>   #include <drm/drm_atomic_helper.h>
>>   
>>   #include "meson_venc_cvbs.h"
> [...]
>
>> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
>> index 0ee9a96b70da..a6d520d5b6ca 100644
>> --- a/include/drm/drm_crtc_helper.h
>> +++ b/include/drm/drm_crtc_helper.h
>> @@ -58,20 +58,4 @@ int drm_helper_connector_dpms(struct drm_connector *connector, int mode);
>>   void drm_helper_resume_force_mode(struct drm_device *dev);
>>   int drm_helper_force_disable_all(struct drm_device *dev);
>>   
>> -/* drm_probe_helper.c */
>> -int drm_helper_probe_single_connector_modes(struct drm_connector
>> -					    *connector, uint32_t maxX,
>> -					    uint32_t maxY);
>> -int drm_helper_probe_detect(struct drm_connector *connector,
>> -			    struct drm_modeset_acquire_ctx *ctx,
>> -			    bool force);
>> -void drm_kms_helper_poll_init(struct drm_device *dev);
>> -void drm_kms_helper_poll_fini(struct drm_device *dev);
>> -bool drm_helper_hpd_irq_event(struct drm_device *dev);
>> -void drm_kms_helper_hotplug_event(struct drm_device *dev);
>> -
>> -void drm_kms_helper_poll_disable(struct drm_device *dev);
>> -void drm_kms_helper_poll_enable(struct drm_device *dev);
>> -bool drm_kms_helper_is_poll_worker(void);
>> -
>>   #endif
>> diff --git a/include/drm/drm_probe_helper.h b/include/drm/drm_probe_helper.h
>> new file mode 100644
>> index 000000000000..96c060c16a1e
>> --- /dev/null
>> +++ b/include/drm/drm_probe_helper.h
>> @@ -0,0 +1,50 @@
>> +/*
>> + * Copyright © 2006 Keith Packard
>> + * Copyright © 2007-2008 Dave Airlie
>> + * Copyright © 2007-2008 Intel Corporation
>> + *   Jesse Barnes <jesse.barnes@intel.com>
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be included in
>> + * all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + * OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +#ifndef __DRM_PROBE_HELPER_H__
>> +#define __DRM_PROBE_HELPER_H__
>> +
>> +#include <linux/types.h>
>> +
>> +struct drm_connector;
>> +struct drm_device;
>> +struct drm_modeset_acquire_ctx;
>> +
>> +int drm_helper_probe_single_connector_modes(struct drm_connector
>> +					    *connector, uint32_t maxX,
>> +					    uint32_t maxY);
>> +int drm_helper_probe_detect(struct drm_connector *connector,
>> +			    struct drm_modeset_acquire_ctx *ctx,
>> +			    bool force);
>> +void drm_kms_helper_poll_init(struct drm_device *dev);
>> +void drm_kms_helper_poll_fini(struct drm_device *dev);
>> +bool drm_helper_hpd_irq_event(struct drm_device *dev);
>> +void drm_kms_helper_hotplug_event(struct drm_device *dev);
>> +
>> +void drm_kms_helper_poll_disable(struct drm_device *dev);
>> +void drm_kms_helper_poll_enable(struct drm_device *dev);
>> +bool drm_kms_helper_is_poll_worker(void);
>> +
>> +#endif
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found] <20190115104137.25695-1-daniel.vetter@ffwll.ch>
  2019-01-15 10:57 ` Jani Nikula
  2019-01-15 12:26 ` Neil Armstrong
@ 2019-01-15 14:30 ` Laurent Pinchart
  2019-01-16  3:30 ` Alex Deucher
  3 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2019-01-15 14:30 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics Development, DRI Development, Sam Ravnborg,
	Jani Nikula, Rodrigo Vivi, Benjamin Gaignard, Daniel Vetter,
	linux-arm-kernel, virtualization, etnaviv, linux-samsung-soc,
	linux-mediatek, linux-amlogic, linux-arm-msm, freedreno, nouveau,
	spice-devel, amd-gfx, linux-renesas-soc, linux-rockchip,
	linux-stm32, linux-tegra, xen-devel

Hi Daniel,

Thank you for the patch.

On Tuesday, 15 January 2019 12:41:37 EET Daniel Vetter wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
> 
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
> 
> v2: Make it compile. There was so much compile fail on arm drivers
> that I figured I'll better not include any of the acks on v1.
> 
> v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
> not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
> there was still one, which this patch largely removes. Which means
> rolling out lots more includes all over.
> 
> This will also conflict with ongoing drmP.h cleanup by others I
> expect.
> 
> v3: Rebase on top of atomic bochs.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v2)
> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: etnaviv@lists.freedesktop.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: intel-gfx@lists.freedesktop.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: spice-devel@lists.freedesktop.org
> Cc: amd-gfx@lists.freedesktop.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-stm32@st-md-mailman.stormreply.com
> Cc: linux-tegra@vger.kernel.org
> Cc: xen-devel@lists.xen.org
> ---
> Merging this is going to be a bit a mess due to all the ongoing drmP.h
> cleanups. I think the following should work:
> - Apply Sam's prep patches for removing drmP.h from
>   drm_modeset_helper.h
> - Get the i915 drmP.h cleanup backmerged into drm-misc-next
> - Apply this patch.
> - Apply Sam's patch to remove drmP.h from drm_modeset_helper.h
> - All through drm-misc-next, which has some potential for trivial
>   conflicts around #includes with other drivers unfortunately.
> 
> I hope there's no other driver who'll blow up accidentally because
> someone else is doing a drmP.h cleanup. Laurent maybe?

There's a drmP.h cleanup in the R-Car DU driver, but it doesn't conflict with 
this patch, the combination of both compiles fine.

> Jani, ack on this?
> -Daniel
> ---

[snip]

>  drivers/gpu/drm/bridge/adv7511/adv7511.h      |  5 +-
>  drivers/gpu/drm/bridge/analogix-anx78xx.c     |  2 +-
>  drivers/gpu/drm/bridge/dumb-vga-dac.c         |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  2 +-
>  drivers/gpu/drm/bridge/ti-tfp410.c            |  2 +-
>  drivers/gpu/drm/drm_atomic_helper.c           |  1 -
>  drivers/gpu/drm/drm_dp_mst_topology.c         |  2 +-
>  drivers/gpu/drm/drm_modeset_helper.c          |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c            |  2 +-
>  drivers/gpu/drm/drm_simple_kms_helper.c       |  2 +-
>  drivers/gpu/drm/omapdrm/omap_connector.c      |  2 +-
>  drivers/gpu/drm/omapdrm/omap_crtc.c           |  2 +-
>  drivers/gpu/drm/omapdrm/omap_drv.c            |  2 +-
>  drivers/gpu/drm/omapdrm/omap_drv.h            |  2 +-
>  drivers/gpu/drm/omapdrm/omap_encoder.c        |  2 +-
>  drivers/gpu/drm/omapdrm/omap_fb.c             |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c        |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_encoder.c     |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c       |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_crtc.c     |  1 +
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c      |  1 +
>  drivers/gpu/drm/shmobile/shmob_drm_kms.c      |  1 +
>  include/drm/drm_crtc_helper.h                 | 16 ------
>  include/drm/drm_probe_helper.h                | 50 +++++++++++++++++++

For the above files, with the comments below addressed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  227 files changed, 289 insertions(+), 200 deletions(-)
>  create mode 100644 include/drm/drm_probe_helper.h

[snip]

> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 73d8ccb97742..d52ffab41eb4
> 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> @@ -14,8 +14,11 @@
>  #include <linux/regmap.h>
>  #include <linux/regulator/consumer.h>
> 
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

The probe helpers are needed in adv7511_drv.c only, I would move the include 
there.

>  #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_connector.h>
> +#include <drm/drm_modes.h>
> +#include <drm/drm_bridge.h>

Please keep the headers alphabetically sorted, here and in all other drivers.

>  #define ADV7511_REG_CHIP_REVISION		0x00
>  #define ADV7511_REG_N0				0x01

[snip]

> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c
> b/drivers/gpu/drm/omapdrm/omap_crtc.c index 40acf4ce7c9f..9beb0edd5ffa
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -18,7 +18,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

This file doesn't use the probe helpers, you can drop this.

>  #include <drm/drm_mode.h>
>  #include <drm/drm_plane_helper.h>
>  #include <linux/math64.h>

[snip]

> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h
> b/drivers/gpu/drm/omapdrm/omap_drv.h index bd7f2c227a25..513ae8ab5e64
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -23,7 +23,7 @@
>  #include <linux/workqueue.h>
> 
>  #include <drm/drmP.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

This isn't needed globally in the driver either.

>  #include <drm/drm_gem.h>
>  #include <drm/omap_drm.h>
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c
> b/drivers/gpu/drm/omapdrm/omap_encoder.c index 148b6b20274f..cd2328fa4ba6
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_encoder.c
> +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
> @@ -18,7 +18,7 @@
>  #include <linux/list.h>
> 
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_atomic_helper.h>

As far as I can tell this is only used to include 
drm_modeset_helper_vtables.h. Should we include that file instead ?

>  #include <drm/drm_edid.h>
> 
>  #include "omap_drv.h"

[snip]

> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 90dacab67be5..b15d2b3a07f1
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -15,7 +15,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

Not needed either.

>  #include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_plane_helper.h>

[snip]

> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
> b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c index
> 1877764bd6d9..0b440f554aed 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
> @@ -11,7 +11,7 @@
> 
>  #include <drm/drmP.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_atomic_helper.h>

As far as I can tell this is only used to include 
drm_modeset_helper_vtables.h. Should we include that file instead ?

>  #include <drm/drm_panel.h>
> 
>  #include "rcar_du_drv.h"

[snip]

> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index 39d5ae3fdf72..b7fa278ca745
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -11,7 +11,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

Not needed.

>  #include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_plane_helper.h>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 4576119e7777..35b2a4d3ae74
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
> @@ -10,7 +10,7 @@
>  #include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>

Not needed.

>  #include <drm/drm_fb_cma_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_gem_framebuffer_helper.h>

[snip]

> diff --git a/include/drm/drm_probe_helper.h b/include/drm/drm_probe_helper.h
> new file mode 100644
> index 000000000000..96c060c16a1e
> --- /dev/null
> +++ b/include/drm/drm_probe_helper.h
> @@ -0,0 +1,50 @@
> +/*
> + * Copyright © 2006 Keith Packard
> + * Copyright © 2007-2008 Dave Airlie
> + * Copyright © 2007-2008 Intel Corporation
> + *   Jesse Barnes <jesse.barnes@intel.com>
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the
> "Software"), + * to deal in the Software without restriction, including
> without limitation + * the rights to use, copy, modify, merge, publish,
> distribute, sublicense, + * and/or sell copies of the Software, and to
> permit persons to whom the + * Software is furnished to do so, subject to
> the following conditions: + *
> + * The above copyright notice and this permission notice shall be included
> in + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
> IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
> ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF
> CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH
> THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE.

Let's use an SPDX tag instead.

> + */
> +
> +#ifndef __DRM_PROBE_HELPER_H__
> +#define __DRM_PROBE_HELPER_H__
> +
> +#include <linux/types.h>
> +
> +struct drm_connector;
> +struct drm_device;
> +struct drm_modeset_acquire_ctx;
> +
> +int drm_helper_probe_single_connector_modes(struct drm_connector
> +					    *connector, uint32_t maxX,
> +					    uint32_t maxY);
> +int drm_helper_probe_detect(struct drm_connector *connector,
> +			    struct drm_modeset_acquire_ctx *ctx,
> +			    bool force);
> +void drm_kms_helper_poll_init(struct drm_device *dev);
> +void drm_kms_helper_poll_fini(struct drm_device *dev);
> +bool drm_helper_hpd_irq_event(struct drm_device *dev);
> +void drm_kms_helper_hotplug_event(struct drm_device *dev);
> +
> +void drm_kms_helper_poll_disable(struct drm_device *dev);
> +void drm_kms_helper_poll_enable(struct drm_device *dev);
> +bool drm_kms_helper_is_poll_worker(void);
> +
> +#endif

-- 
Regards,

Laurent Pinchart




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found] <20190115104137.25695-1-daniel.vetter@ffwll.ch>
  2019-01-15 10:57 ` Jani Nikula
@ 2019-01-15 12:26 ` Neil Armstrong
  2019-01-15 14:58   ` Oleksandr Andrushchenko
  2019-01-15 14:30 ` Laurent Pinchart
  2019-01-16  3:30 ` Alex Deucher
  3 siblings, 1 reply; 13+ messages in thread
From: Neil Armstrong @ 2019-01-15 12:26 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics Development
  Cc: DRI Development, virtualization, Laurent Pinchart, Daniel Vetter,
	Sam Ravnborg, linux-stm32, linux-samsung-soc, amd-gfx,
	linux-rockchip, nouveau, spice-devel, linux-arm-msm, etnaviv,
	linux-mediatek, Rodrigo Vivi, linux-tegra, linux-amlogic,
	linux-arm-kernel, xen-devel, linux-renesas-soc, freedreno

On 15/01/2019 11:41, Daniel Vetter wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
> 
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
> 
> v2: Make it compile. There was so much compile fail on arm drivers
> that I figured I'll better not include any of the acks on v1.
> 
> v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
> not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
> there was still one, which this patch largely removes. Which means
> rolling out lots more includes all over.
> 
> This will also conflict with ongoing drmP.h cleanup by others I
> expect.
> 
> v3: Rebase on top of atomic bochs.
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v2)
> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: etnaviv@lists.freedesktop.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: intel-gfx@lists.freedesktop.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: spice-devel@lists.freedesktop.org
> Cc: amd-gfx@lists.freedesktop.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-stm32@st-md-mailman.stormreply.com
> Cc: linux-tegra@vger.kernel.org
> Cc: xen-devel@lists.xen.org
> ---
> Merging this is going to be a bit a mess due to all the ongoing drmP.h
> cleanups. I think the following should work:
> - Apply Sam's prep patches for removing drmP.h from
>   drm_modeset_helper.h
> - Get the i915 drmP.h cleanup backmerged into drm-misc-next
> - Apply this patch.
> - Apply Sam's patch to remove drmP.h from drm_modeset_helper.h
> - All through drm-misc-next, which has some potential for trivial
>   conflicts around #includes with other drivers unfortunately.
> 
> I hope there's no other driver who'll blow up accidentally because
> someone else is doing a drmP.h cleanup. Laurent maybe?
> 
> Jani, ack on this?
> -Daniel
> ---
>  .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h      |  1 +
>  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
>  .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  2 +-
>  .../display/amdgpu_dm/amdgpu_dm_services.c    |  2 +-
>  drivers/gpu/drm/arc/arcpgu_crtc.c             |  2 +-
>  drivers/gpu/drm/arc/arcpgu_drv.c              |  2 +-
>  drivers/gpu/drm/arc/arcpgu_sim.c              |  2 +-
>  drivers/gpu/drm/arm/hdlcd_crtc.c              |  2 +-
>  drivers/gpu/drm/arm/hdlcd_drv.c               |  2 +-
>  drivers/gpu/drm/arm/malidp_crtc.c             |  2 +-
>  drivers/gpu/drm/arm/malidp_drv.c              |  2 +-
>  drivers/gpu/drm/arm/malidp_mw.c               |  2 +-
>  drivers/gpu/drm/armada/armada_510.c           |  2 +-
>  drivers/gpu/drm/armada/armada_crtc.c          |  2 +-
>  drivers/gpu/drm/armada/armada_crtc.h          |  2 +
>  drivers/gpu/drm/armada/armada_drv.c           |  2 +-
>  drivers/gpu/drm/armada/armada_fb.c            |  2 +-
>  drivers/gpu/drm/ast/ast_drv.c                 |  1 +
>  drivers/gpu/drm/ast/ast_mode.c                |  1 +
>  .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c    |  2 +-
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h  |  2 +-
>  drivers/gpu/drm/bochs/bochs_drv.c             |  1 +
>  drivers/gpu/drm/bochs/bochs_kms.c             |  1 +
>  drivers/gpu/drm/bridge/adv7511/adv7511.h      |  5 +-
>  drivers/gpu/drm/bridge/analogix-anx78xx.c     |  2 +-
>  .../drm/bridge/analogix/analogix_dp_core.c    |  2 +-
>  drivers/gpu/drm/bridge/cdns-dsi.c             |  2 +-
>  drivers/gpu/drm/bridge/dumb-vga-dac.c         |  2 +-
>  .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |  2 +-
>  drivers/gpu/drm/bridge/nxp-ptn3460.c          |  2 +-
>  drivers/gpu/drm/bridge/panel.c                |  2 +-
>  drivers/gpu/drm/bridge/parade-ps8622.c        |  2 +-
>  drivers/gpu/drm/bridge/sii902x.c              |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |  2 +-
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  2 +-
>  drivers/gpu/drm/bridge/tc358764.c             |  2 +-
>  drivers/gpu/drm/bridge/tc358767.c             |  2 +-
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  2 +-
>  drivers/gpu/drm/bridge/ti-tfp410.c            |  2 +-
>  drivers/gpu/drm/cirrus/cirrus_drv.c           |  1 +
>  drivers/gpu/drm/cirrus/cirrus_mode.c          |  1 +
>  drivers/gpu/drm/drm_atomic_helper.c           |  1 -
>  drivers/gpu/drm/drm_dp_mst_topology.c         |  2 +-
>  drivers/gpu/drm/drm_modeset_helper.c          |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c            |  2 +-
>  drivers/gpu/drm/drm_simple_kms_helper.c       |  2 +-
>  drivers/gpu/drm/etnaviv/etnaviv_drv.h         |  1 -
>  drivers/gpu/drm/exynos/exynos_dp.c            |  3 +-
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c      |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c       |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_drv.c       |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fb.c        |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c     |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c      |  2 +-
>  drivers/gpu/drm/exynos/exynos_hdmi.c          |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c    |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c     |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c     |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |  2 +-
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c     |  2 +-
>  drivers/gpu/drm/gma500/psb_intel_drv.h        |  1 +
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c    |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c |  2 +-
>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c  |  2 +-
>  drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |  2 +-
>  .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c   |  2 +-
>  .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c   |  2 +-
>  drivers/gpu/drm/i2c/ch7006_priv.h             |  1 +
>  drivers/gpu/drm/i2c/sil164_drv.c              |  2 +-
>  drivers/gpu/drm/i2c/tda998x_drv.c             |  2 +-
>  drivers/gpu/drm/i915/i915_debugfs.c           |  3 +-
>  drivers/gpu/drm/i915/i915_drv.c               |  2 +-
>  drivers/gpu/drm/i915/i915_gem.c               |  2 +
>  drivers/gpu/drm/i915/i915_ioc32.c             |  1 +
>  drivers/gpu/drm/i915/i915_irq.c               |  2 +
>  drivers/gpu/drm/i915/i915_pci.c               |  2 +
>  drivers/gpu/drm/i915/i915_trace.h             |  2 +
>  drivers/gpu/drm/i915/intel_crt.c              |  2 +-
>  drivers/gpu/drm/i915/intel_display.c          |  2 +-
>  drivers/gpu/drm/i915/intel_dp.c               |  2 +-
>  drivers/gpu/drm/i915/intel_dp_mst.c           |  2 +-
>  drivers/gpu/drm/i915/intel_drv.h              |  3 +-
>  drivers/gpu/drm/i915/intel_fbc.c              |  2 +
>  drivers/gpu/drm/i915/intel_fbdev.c            |  2 +
>  drivers/gpu/drm/i915/intel_lpe_audio.c        |  1 +
>  drivers/gpu/drm/i915/intel_overlay.c          |  2 +
>  drivers/gpu/drm/imx/dw_hdmi-imx.c             |  2 +-
>  drivers/gpu/drm/imx/imx-drm-core.c            |  2 +-
>  drivers/gpu/drm/imx/imx-ldb.c                 |  2 +-
>  drivers/gpu/drm/imx/imx-tve.c                 |  2 +-
>  drivers/gpu/drm/imx/ipuv3-crtc.c              |  2 +-
>  drivers/gpu/drm/imx/parallel-display.c        |  2 +-
>  drivers/gpu/drm/mediatek/mtk_dpi.c            |  2 +-
>  drivers/gpu/drm/mediatek/mtk_drm_crtc.c       |  2 +-
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c        |  2 +-
>  drivers/gpu/drm/mediatek/mtk_drm_fb.c         |  2 +-
>  drivers/gpu/drm/mediatek/mtk_dsi.c            |  2 +-
>  drivers/gpu/drm/mediatek/mtk_hdmi.c           |  2 +-
>  drivers/gpu/drm/meson/meson_crtc.c            |  2 +-
>  drivers/gpu/drm/meson/meson_drv.c             |  2 +-
>  drivers/gpu/drm/meson/meson_dw_hdmi.c         |  2 +-
>  drivers/gpu/drm/meson/meson_venc_cvbs.c       |  2 +-

For meson:

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

>  drivers/gpu/drm/mgag200/mgag200_mode.c        |  1 +
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  2 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c   |  2 +-
>  drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c     |  2 +-
>  .../gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c  |  2 +-
>  .../gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c  |  2 +-
>  .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c |  2 +-
>  .../gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c  |  2 +-
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c     |  2 +-
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c  |  2 +-
>  drivers/gpu/drm/msm/msm_drv.h                 |  2 +-
>  drivers/gpu/drm/msm/msm_fb.c                  |  2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_crtc.c            |  2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c             |  2 +-
>  drivers/gpu/drm/mxsfb/mxsfb_out.c             |  2 +-
>  drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  1 +
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       |  2 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c   |  1 +
>  drivers/gpu/drm/nouveau/nouveau_display.c     |  1 +
>  drivers/gpu/drm/omapdrm/omap_connector.c      |  2 +-
>  drivers/gpu/drm/omapdrm/omap_crtc.c           |  2 +-
>  drivers/gpu/drm/omapdrm/omap_drv.c            |  2 +-
>  drivers/gpu/drm/omapdrm/omap_drv.h            |  2 +-
>  drivers/gpu/drm/omapdrm/omap_encoder.c        |  2 +-
>  drivers/gpu/drm/omapdrm/omap_fb.c             |  2 +-
>  drivers/gpu/drm/pl111/pl111_drv.c             |  2 +-
>  drivers/gpu/drm/qxl/qxl_display.c             |  2 +-
>  drivers/gpu/drm/qxl/qxl_drv.c                 |  3 +-
>  drivers/gpu/drm/qxl/qxl_fb.c                  |  2 +-
>  drivers/gpu/drm/qxl/qxl_kms.c                 |  2 +-
>  drivers/gpu/drm/radeon/radeon_acpi.c          |  1 +
>  drivers/gpu/drm/radeon/radeon_connectors.c    |  1 +
>  drivers/gpu/drm/radeon/radeon_device.c        |  1 +
>  drivers/gpu/drm/radeon/radeon_display.c       |  1 +
>  drivers/gpu/drm/radeon/radeon_dp_mst.c        |  1 +
>  drivers/gpu/drm/radeon/radeon_drv.c           |  1 +
>  drivers/gpu/drm/radeon/radeon_irq_kms.c       |  1 +
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c        |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_encoder.c     |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_plane.c       |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_du_vsp.c         |  2 +-
>  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  2 +-
>  .../gpu/drm/rockchip/analogix_dp-rockchip.c   |  2 +-
>  drivers/gpu/drm/rockchip/cdn-dp-core.c        |  2 +-
>  drivers/gpu/drm/rockchip/cdn-dp-core.h        |  2 +-
>  drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c   |  2 +-
>  drivers/gpu/drm/rockchip/inno_hdmi.c          |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_fb.c    |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_psr.c   |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_lvds.c      |  2 +-
>  drivers/gpu/drm/rockchip/rockchip_rgb.c       |  2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_crtc.c     |  1 +
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c      |  1 +
>  drivers/gpu/drm/shmobile/shmob_drm_kms.c      |  1 +
>  drivers/gpu/drm/sti/sti_crtc.c                |  2 +-
>  drivers/gpu/drm/sti/sti_drv.c                 |  2 +-
>  drivers/gpu/drm/sti/sti_dvo.c                 |  2 +-
>  drivers/gpu/drm/sti/sti_hda.c                 |  2 +-
>  drivers/gpu/drm/sti/sti_hdmi.c                |  2 +-
>  drivers/gpu/drm/sti/sti_tvout.c               |  2 +-
>  drivers/gpu/drm/stm/drv.c                     |  2 +-
>  drivers/gpu/drm/stm/ltdc.c                    |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_backend.c         |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_crtc.c            |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_drv.c             |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c        |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_lvds.c            |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_rgb.c             |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_tcon.c            |  2 +-
>  drivers/gpu/drm/sun4i/sun4i_tv.c              |  2 +-
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c        |  2 +-
>  drivers/gpu/drm/sun4i/sun8i_mixer.c           |  2 +-
>  drivers/gpu/drm/sun4i/sun8i_ui_layer.c        |  2 +-
>  drivers/gpu/drm/sun4i/sun8i_vi_layer.c        |  2 +-
>  drivers/gpu/drm/tegra/drm.h                   |  2 +-
>  drivers/gpu/drm/tegra/fb.c                    |  1 +
>  drivers/gpu/drm/tegra/hdmi.c                  |  2 +-
>  drivers/gpu/drm/tegra/hub.c                   |  2 +-
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c           |  1 +
>  drivers/gpu/drm/tilcdc/tilcdc_drv.h           |  1 -
>  drivers/gpu/drm/tilcdc/tilcdc_external.c      |  1 +
>  drivers/gpu/drm/tilcdc/tilcdc_panel.c         |  1 +
>  drivers/gpu/drm/tilcdc/tilcdc_tfp410.c        |  1 +
>  drivers/gpu/drm/tinydrm/core/tinydrm-core.c   |  2 +-
>  drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c   |  2 +-
>  drivers/gpu/drm/tve200/tve200_drv.c           |  2 +-
>  drivers/gpu/drm/udl/udl_connector.c           |  1 +
>  drivers/gpu/drm/udl/udl_drv.c                 |  1 +
>  drivers/gpu/drm/udl/udl_main.c                |  1 +
>  drivers/gpu/drm/vc4/vc4_crtc.c                |  2 +-
>  drivers/gpu/drm/vc4/vc4_dpi.c                 |  2 +-
>  drivers/gpu/drm/vc4/vc4_dsi.c                 |  2 +-
>  drivers/gpu/drm/vc4/vc4_hdmi.c                |  2 +-
>  drivers/gpu/drm/vc4/vc4_kms.c                 |  2 +-
>  drivers/gpu/drm/vc4/vc4_txp.c                 |  2 +-
>  drivers/gpu/drm/vc4/vc4_vec.c                 |  2 +-
>  drivers/gpu/drm/virtio/virtgpu_display.c      |  2 +-
>  drivers/gpu/drm/virtio/virtgpu_drv.h          |  2 +-
>  drivers/gpu/drm/vkms/vkms_crtc.c              |  2 +-
>  drivers/gpu/drm/vkms/vkms_drv.c               |  2 +-
>  drivers/gpu/drm/vkms/vkms_output.c            |  2 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.h           |  2 +-
>  drivers/gpu/drm/xen/xen_drm_front.c           |  2 +-
>  drivers/gpu/drm/xen/xen_drm_front_conn.c      |  2 +-
>  drivers/gpu/drm/xen/xen_drm_front_gem.c       |  2 +-
>  drivers/gpu/drm/xen/xen_drm_front_kms.c       |  2 +-
>  drivers/gpu/drm/zte/zx_drm_drv.c              |  2 +-
>  drivers/gpu/drm/zte/zx_hdmi.c                 |  2 +-
>  drivers/gpu/drm/zte/zx_tvenc.c                |  2 +-
>  drivers/gpu/drm/zte/zx_vga.c                  |  2 +-
>  drivers/gpu/drm/zte/zx_vou.c                  |  2 +-
>  drivers/staging/vboxvideo/vbox_irq.c          |  4 +-
>  drivers/staging/vboxvideo/vbox_mode.c         |  2 +-
>  include/drm/drm_crtc_helper.h                 | 16 ------
>  include/drm/drm_probe_helper.h                | 50 +++++++++++++++++++
>  227 files changed, 289 insertions(+), 200 deletions(-)
>  create mode 100644 include/drm/drm_probe_helper.h
> 

[...]

> diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
> index 75d97f1b2e8f..ec573c04206b 100644
> --- a/drivers/gpu/drm/meson/meson_crtc.c
> +++ b/drivers/gpu/drm/meson/meson_crtc.c
> @@ -30,7 +30,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_flip_work.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>
>  
>  #include "meson_crtc.h"
>  #include "meson_plane.h"
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 1f2cf27ecb24..09e67a9cf678 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -31,7 +31,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_flip_work.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>
>  #include <drm/drm_plane_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_gem_framebuffer_helper.h>
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index bc25001b8207..a6165b1a564d 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -27,7 +27,7 @@
>  
>  #include <drm/drmP.h>
>  #include <drm/drm_edid.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/bridge/dw_hdmi.h>
>  
> diff --git a/drivers/gpu/drm/meson/meson_venc_cvbs.c b/drivers/gpu/drm/meson/meson_venc_cvbs.c
> index f7945bae3b4a..64de3a7026d0 100644
> --- a/drivers/gpu/drm/meson/meson_venc_cvbs.c
> +++ b/drivers/gpu/drm/meson/meson_venc_cvbs.c
> @@ -27,7 +27,7 @@
>  
>  #include <drm/drmP.h>
>  #include <drm/drm_edid.h>
> -#include <drm/drm_crtc_helper.h>
> +#include <drm/drm_probe_helper.h>
>  #include <drm/drm_atomic_helper.h>
>  
>  #include "meson_venc_cvbs.h"

[...]

> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
> index 0ee9a96b70da..a6d520d5b6ca 100644
> --- a/include/drm/drm_crtc_helper.h
> +++ b/include/drm/drm_crtc_helper.h
> @@ -58,20 +58,4 @@ int drm_helper_connector_dpms(struct drm_connector *connector, int mode);
>  void drm_helper_resume_force_mode(struct drm_device *dev);
>  int drm_helper_force_disable_all(struct drm_device *dev);
>  
> -/* drm_probe_helper.c */
> -int drm_helper_probe_single_connector_modes(struct drm_connector
> -					    *connector, uint32_t maxX,
> -					    uint32_t maxY);
> -int drm_helper_probe_detect(struct drm_connector *connector,
> -			    struct drm_modeset_acquire_ctx *ctx,
> -			    bool force);
> -void drm_kms_helper_poll_init(struct drm_device *dev);
> -void drm_kms_helper_poll_fini(struct drm_device *dev);
> -bool drm_helper_hpd_irq_event(struct drm_device *dev);
> -void drm_kms_helper_hotplug_event(struct drm_device *dev);
> -
> -void drm_kms_helper_poll_disable(struct drm_device *dev);
> -void drm_kms_helper_poll_enable(struct drm_device *dev);
> -bool drm_kms_helper_is_poll_worker(void);
> -
>  #endif
> diff --git a/include/drm/drm_probe_helper.h b/include/drm/drm_probe_helper.h
> new file mode 100644
> index 000000000000..96c060c16a1e
> --- /dev/null
> +++ b/include/drm/drm_probe_helper.h
> @@ -0,0 +1,50 @@
> +/*
> + * Copyright © 2006 Keith Packard
> + * Copyright © 2007-2008 Dave Airlie
> + * Copyright © 2007-2008 Intel Corporation
> + *   Jesse Barnes <jesse.barnes@intel.com>
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#ifndef __DRM_PROBE_HELPER_H__
> +#define __DRM_PROBE_HELPER_H__
> +
> +#include <linux/types.h>
> +
> +struct drm_connector;
> +struct drm_device;
> +struct drm_modeset_acquire_ctx;
> +
> +int drm_helper_probe_single_connector_modes(struct drm_connector
> +					    *connector, uint32_t maxX,
> +					    uint32_t maxY);
> +int drm_helper_probe_detect(struct drm_connector *connector,
> +			    struct drm_modeset_acquire_ctx *ctx,
> +			    bool force);
> +void drm_kms_helper_poll_init(struct drm_device *dev);
> +void drm_kms_helper_poll_fini(struct drm_device *dev);
> +bool drm_helper_hpd_irq_event(struct drm_device *dev);
> +void drm_kms_helper_hotplug_event(struct drm_device *dev);
> +
> +void drm_kms_helper_poll_disable(struct drm_device *dev);
> +void drm_kms_helper_poll_enable(struct drm_device *dev);
> +bool drm_kms_helper_is_poll_worker(void);
> +
> +#endif
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm: Split out drm_probe_helper.h
       [not found] <20190115104137.25695-1-daniel.vetter@ffwll.ch>
@ 2019-01-15 10:57 ` Jani Nikula
  2019-01-15 12:26 ` Neil Armstrong
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2019-01-15 10:57 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics Development
  Cc: DRI Development, Daniel Vetter, Sam Ravnborg, Laurent Pinchart,
	Rodrigo Vivi, Benjamin Gaignard, Daniel Vetter, linux-arm-kernel,
	virtualization, etnaviv, linux-samsung-soc, linux-mediatek,
	linux-amlogic, linux-arm-msm, freedreno, nouveau, spice-devel,
	amd-gfx, linux-renesas-soc, linux-rockchip, linux-stm32,
	linux-tegra, xen-devel

On Tue, 15 Jan 2019, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Having the probe helper stuff (which pretty much everyone needs) in
> the drm_crtc_helper.h file (which atomic drivers should never need) is
> confusing. Split them out.
>
> To make sure I actually achieved the goal here I went through all
> drivers. And indeed, all atomic drivers are now free of
> drm_crtc_helper.h includes.
>
> v2: Make it compile. There was so much compile fail on arm drivers
> that I figured I'll better not include any of the acks on v1.
>
> v3: Massive rebase because i915 has lost a lot of drmP.h includes, but
> not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h
> there was still one, which this patch largely removes. Which means
> rolling out lots more includes all over.
>
> This will also conflict with ongoing drmP.h cleanup by others I
> expect.
>
> v3: Rebase on top of atomic bochs.
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v2)
> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: etnaviv@lists.freedesktop.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: intel-gfx@lists.freedesktop.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: nouveau@lists.freedesktop.org
> Cc: spice-devel@lists.freedesktop.org
> Cc: amd-gfx@lists.freedesktop.org
> Cc: linux-renesas-soc@vger.kernel.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-stm32@st-md-mailman.stormreply.com
> Cc: linux-tegra@vger.kernel.org
> Cc: xen-devel@lists.xen.org
> ---
> Merging this is going to be a bit a mess due to all the ongoing drmP.h
> cleanups. I think the following should work:
> - Apply Sam's prep patches for removing drmP.h from
>   drm_modeset_helper.h
> - Get the i915 drmP.h cleanup backmerged into drm-misc-next
> - Apply this patch.
> - Apply Sam's patch to remove drmP.h from drm_modeset_helper.h
> - All through drm-misc-next, which has some potential for trivial
>   conflicts around #includes with other drivers unfortunately.
>
> I hope there's no other driver who'll blow up accidentally because
> someone else is doing a drmP.h cleanup. Laurent maybe?
>
> Jani, ack on this?

Acked-by: Jani Nikula <jani.nikula@intel.com>



-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-01-24 12:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190116163442.12622-1-daniel.vetter@ffwll.ch>
2019-01-16 18:10 ` [PATCH] drm: Split out drm_probe_helper.h Sam Ravnborg
2019-01-17 16:45   ` Daniel Vetter
2019-01-17 17:45     ` Sam Ravnborg
2019-01-21 22:13       ` Sam Ravnborg
2019-01-22  8:03         ` Daniel Vetter
     [not found]   ` <20190117210334.13234-1-daniel.vetter@ffwll.ch>
2019-01-23 17:00     ` Sam Ravnborg
2019-01-24  9:46       ` Daniel Vetter
2019-01-24 12:39         ` Daniel Vetter
     [not found] <20190115104137.25695-1-daniel.vetter@ffwll.ch>
2019-01-15 10:57 ` Jani Nikula
2019-01-15 12:26 ` Neil Armstrong
2019-01-15 14:58   ` Oleksandr Andrushchenko
2019-01-15 14:30 ` Laurent Pinchart
2019-01-16  3:30 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).