Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-samsung-soc@vger.kernel.org,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	Mark Yao <mark.yao@rock-chips.com>
Subject: Re: [PATCH 12/13] drm/irq: Expel legacy API
Date: Tue, 16 Dec 2014 19:00:54 +0100	[thread overview]
Message-ID: <20141216180054.GA2711@phenom.ffwll.local> (raw)
In-Reply-To: <20141216175928.GZ2711@phenom.ffwll.local>

On Tue, Dec 16, 2014 at 06:59:28PM +0100, Daniel Vetter wrote:
> On Tue, Dec 16, 2014 at 05:53:34PM +0100, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > These legacy functions all operate on the struct drm_device * and an
> > index to the CRTC that they should access. This is bad because it
> > requires keeping track of a global data structures to resolve the index
> > to CRTC object lookup. In order to get rid of this global data new APIs
> > have been introduced that operate directly on these objects. Currently
> > the new functions still operate on the old data, but the goal is to
> > eventually move that data into struct drm_crtc. In order to start
> > conversion of drivers to the new API, move the old API away.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> 
> Imo we should try to share code between the legacy vblank code and what
> we're now building up with the drm_crtc_ prefixed functions for native kms
> drivers. Instead I think we should do full copies with the following
> recipe:
> - Look at a given function and make sure all kms drivers (and any
>   callchains used by kms drivers) uses the drm_crtc_ variant and that any
>   ums drivers uses the drm_vblank_ version. So big audit.
> - Then for each such function copy it to drm_irq_legacy.c and mark the old
>   copy in drm_irq.c as static and drop the EXPORT_SYMBOL for it.
> - Then inline the logic for native kms drivers.
> 
> Just moving the functions around doesn't really help us at all since we
> still have the problem that both ums and kms code uses them. Which means
> we can't use drm_crtc and store vblank data in there.

There's the added problem that moving breaks git blame (at least in
default mode) a bit, so better to keep the version that we want to
transform into the kms-native ones where they currently are.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-12-16 18:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 16:53 [PATCH 01/13] drm/irq: Remove negative CRTC index special-case Thierry Reding
2014-12-16 16:53 ` [PATCH 02/13] drm/bochs: Store correct CRTC index in events Thierry Reding
2014-12-16 16:53 ` [PATCH 03/13] drm/exynos: " Thierry Reding
2014-12-16 16:53 ` [PATCH 04/13] drm/imx: Make pipe number unsigned Thierry Reding
2014-12-16 17:30   ` Philipp Zabel
2014-12-16 16:53 ` [PATCH 05/13] drm/imx: Store correct CRTC index in events Thierry Reding
2014-12-16 17:36   ` Philipp Zabel
2014-12-16 16:53 ` [PATCH 06/13] drm/rockchip: " Thierry Reding
2014-12-16 16:53 ` [PATCH 07/13] drm/sti: " Thierry Reding
2014-12-16 16:53 ` [PATCH 08/13] drm/irq: Check for valid VBLANK before dereference Thierry Reding
2014-12-17  3:11   ` Michel Dänzer
2014-12-16 16:53 ` [PATCH 09/13] drm/irq: Make pipe unsigned and name consistent Thierry Reding
2014-12-16 17:53   ` Daniel Vetter
2014-12-16 16:53 ` [PATCH 10/13] drm/irq: Add drm_crtc_vblank_count_and_time() Thierry Reding
2014-12-16 16:53 ` [PATCH 11/13] drm/irq: Document return values more consistently Thierry Reding
2014-12-16 18:02   ` Daniel Vetter
2014-12-16 16:53 ` [PATCH 12/13] drm/irq: Expel legacy API Thierry Reding
2014-12-16 17:59   ` Daniel Vetter
2014-12-16 18:00     ` Daniel Vetter [this message]
2014-12-16 16:53 ` [PATCH 13/13] drm/irq: Move some prototypes to drm_crtc.h Thierry Reding

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=20141216180054.GA2711@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=benjamin.gaignard@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.yao@rock-chips.com \
    --cc=thierry.reding@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox