All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Liviu Dudau <liviu.dudau@arm.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	virtualization@lists.linux-foundation.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-samsung-soc@vger.kernel.org,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	amd-gfx@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	nouveau@lists.freedesktop.org, spice-devel@lists.freedesktop.org,
	Jani Nikula <jani.nikula@intel.com>,
	linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	etnaviv@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.
Subject: Re: [PATCH] drm: Split out drm_probe_helper.h
Date: Mon, 21 Jan 2019 23:13:29 +0100	[thread overview]
Message-ID: <20190121221329.GA6512__36801.3520537474$1548108919$gmane$org@ravnborg.org> (raw)
In-Reply-To: <20190117174531.GA14041@ravnborg.org>

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

  parent reply	other threads:[~2019-01-21 22:13 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 16:34 [PATCH] drm: Split out drm_probe_helper.h Daniel Vetter
2019-01-16 16:34 ` Daniel Vetter
2019-01-16 18:10 ` Sam Ravnborg
2019-01-16 18:10 ` Sam Ravnborg
2019-01-16 18:10 ` Sam Ravnborg
2019-01-16 18:10   ` Sam Ravnborg
2019-01-16 18:10   ` Sam Ravnborg
2019-01-16 18:10   ` Sam Ravnborg
2019-01-17 16:45   ` Daniel Vetter
2019-01-17 16:45   ` Daniel Vetter
     [not found]   ` <20190116181018.GA27364-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
2019-01-17 16:45     ` Daniel Vetter
2019-01-17 16:45       ` Daniel Vetter
2019-01-17 16:45       ` Daniel Vetter
2019-01-17 16:45       ` Daniel Vetter
2019-01-17 17:45       ` Sam Ravnborg
2019-01-17 17:45         ` Sam Ravnborg
2019-01-17 17:45         ` Sam Ravnborg
2019-01-17 17:45         ` Sam Ravnborg
2019-01-21 22:13         ` Sam Ravnborg
2019-01-21 22:13         ` Sam Ravnborg
2019-01-21 22:13           ` Sam Ravnborg
2019-01-21 22:13           ` Sam Ravnborg
2019-01-21 22:13           ` Sam Ravnborg
2019-01-22  8:03           ` Daniel Vetter
     [not found]           ` <20190121221329.GA6512-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
2019-01-22  8:03             ` Daniel Vetter
2019-01-22  8:03               ` Daniel Vetter
2019-01-22  8:03               ` Daniel Vetter
2019-01-22  8:03               ` Daniel Vetter
2019-01-22  8:03           ` Daniel Vetter
2019-01-21 22:13         ` Sam Ravnborg [this message]
2019-01-17 17:45       ` Sam Ravnborg
2019-01-17 17:45       ` Sam Ravnborg
2019-01-17 21:03     ` Daniel Vetter
2019-01-17 21:03       ` Daniel Vetter
2019-01-22 21:16       ` Wentland, Harry
2019-01-22 21:16       ` Wentland, Harry
2019-01-22 21:16         ` Wentland, Harry
2019-01-23 17:00       ` Sam Ravnborg
2019-01-23 17:00       ` Sam Ravnborg
     [not found]       ` <20190117210334.13234-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-01-23 17:00         ` Sam Ravnborg
2019-01-23 17:00           ` Sam Ravnborg
2019-01-23 17:00           ` Sam Ravnborg
2019-01-23 17:00           ` Sam Ravnborg
2019-01-24  9:46           ` Daniel Vetter
2019-01-24  9:46             ` Daniel Vetter
2019-01-24  9:46             ` Daniel Vetter
2019-01-24  9:46             ` Daniel Vetter
2019-01-24 12:39             ` Daniel Vetter
     [not found]             ` <20190124094646.GR3271-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2019-01-24 12:39               ` Daniel Vetter
2019-01-24 12:39                 ` Daniel Vetter
2019-01-24 12:39                 ` Daniel Vetter
2019-01-24 12:39                 ` Daniel Vetter
2019-01-24 12:39             ` Daniel Vetter
2019-01-24  9:46           ` Daniel Vetter
2019-01-24  9:46           ` Daniel Vetter
2019-01-17 21:03   ` Daniel Vetter
2019-01-17 21:03   ` Daniel Vetter
2019-01-17  9:49 ` ✗ Fi.CI.BAT: failure for drm: Split out drm_probe_helper.h (rev3) Patchwork
2019-01-17 21:52 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Split out drm_probe_helper.h (rev4) Patchwork
2019-01-17 22:09 ` ✓ Fi.CI.BAT: success " Patchwork
2019-01-18  7:42 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-01-16 16:34 [PATCH] drm: Split out drm_probe_helper.h Daniel Vetter
2019-01-16 16:34 Daniel Vetter
2019-01-16 13:51 Daniel Vetter
2019-01-16 13:51 Daniel Vetter
2019-01-16 13:51 Daniel Vetter
2019-01-16 13:51 ` Daniel Vetter
2019-01-15 10:41 Daniel Vetter
2019-01-15 10:41 Daniel Vetter
2019-01-15 10:41 Daniel Vetter
2019-01-15 10:41 ` Daniel Vetter
2019-01-15 10:57 ` Jani Nikula
2019-01-15 10:57 ` Jani Nikula
2019-01-15 12:26 ` Neil Armstrong
     [not found] ` <20190115104137.25695-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-01-15 10:57   ` Jani Nikula
2019-01-15 10:57     ` Jani Nikula
2019-01-15 10:57     ` Jani Nikula
2019-01-15 10:57     ` Jani Nikula
2019-01-15 12:26   ` Neil Armstrong
2019-01-15 12:26     ` Neil Armstrong
2019-01-15 12:26     ` Neil Armstrong
2019-01-15 12:26     ` Neil Armstrong
2019-01-15 14:58     ` Oleksandr Andrushchenko
2019-01-15 14:58     ` Oleksandr Andrushchenko
2019-01-15 14:58       ` Oleksandr Andrushchenko
2019-01-15 14:58       ` Oleksandr Andrushchenko
2019-01-15 14:58       ` Oleksandr Andrushchenko
2019-01-16  3:30   ` Alex Deucher
2019-01-16  3:30     ` Alex Deucher
2019-01-16  3:30     ` Alex Deucher
2019-01-16  3:30     ` Alex Deucher
2019-01-15 12:26 ` Neil Armstrong
2019-01-15 14:30 ` Laurent Pinchart
2019-01-15 14:30   ` Laurent Pinchart
2019-01-15 14:30   ` Laurent Pinchart
2019-01-15 14:30   ` Laurent Pinchart
2019-01-15 14:30 ` Laurent Pinchart
2019-01-15 14:30 ` Laurent Pinchart
2019-01-16  2:11 ` CK Hu
2019-01-16  2:11 ` CK Hu
2019-01-16  2:11   ` CK Hu
2019-01-16  3:30 ` Alex Deucher
2019-01-16  3:30 ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20190121221329.GA6512__36801.3520537474$1548108919$gmane$org@ravnborg.org' \
    --to=sam@ravnborg.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead. \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=narmstrong@baylibre.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.