All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	Nouveau Dev <nouveau@lists.freedesktop.org>,
	Liviu Dudau <liviu.dudau@arm.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	"open list:VIRTIO CORE,
	NET..." <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 <linux-samsung-soc@vger.kernel.org>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
	<spice-devel@lists.freedesktop.org>,
	Jani Nikula <jani.nikula@intel.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	The etnaviv authors <etnaviv@lists.freedesktop.org>
Subject: Re: [PATCH] drm: Split out drm_probe_helper.h
Date: Tue, 22 Jan 2019 09:03:36 +0100	[thread overview]
Message-ID: <CAKMK7uF_8yRycA4ZUyudH7dM23DOiFEkKStAbbAvD=79y_UE_Q__32905.0420130201$1548144298$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <20190121221329.GA6512@ravnborg.org>

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-01-22  8:03 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 [this message]
     [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
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='CAKMK7uF_8yRycA4ZUyudH7dM23DOiFEkKStAbbAvD=79y_UE_Q__32905.0420130201$1548144298$gmane$org@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.vetter@intel.com \
    --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-arm-msm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=liviu.dudau@arm.com \
    --cc=narmstrong@baylibre.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=sam@ravnborg.org \
    --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.