From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 08/12] drm/irq: Add kms-native crtc interface functions Date: Thu, 15 May 2014 09:34:27 +0200 Message-ID: <20140515073425.GC5952@ulmo> References: <1400093477-3217-1-git-send-email-daniel.vetter@ffwll.ch> <1400093477-3217-9-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0982512389==" Return-path: In-Reply-To: <1400093477-3217-9-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Intel Graphics Development , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0982512389== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NKoe5XOeduwbEQHU" Content-Disposition: inline --NKoe5XOeduwbEQHU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 14, 2014 at 08:51:10PM +0200, Daniel Vetter wrote: > We need to start somewhere ... With this the only places left in i915 > where we use pipe integers is in the interrupt handling code. And > there it actually makes some amount of sense. Very much welcome addition. Some minor comments below. > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_irq.c | 81 ++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_display.c | 22 +++++----- Perhaps move the i915 changes into a separate commit? > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c [...] > /** > + * drm_crtc_vblank_get - get a reference count on vblank events > + * @dev: drm device > + * @crtc: which CRTC to own > + * > + * Acquire a reference count on vblank events to avoid having them disabled > + * while in use. > + * > + * This is the native kms version of drm_vblank_off(). > + * > + * Returns: > + * Zero on success, nonzero on failure. > + */ > +int drm_crtc_vblank_get(struct drm_device *dev, struct drm_crtc *crtc) > +{ > + return drm_vblank_get(dev, drm_crtc_index(crtc)); > +} > +EXPORT_SYMBOL(drm_crtc_vblank_get); This seems slightly backwards. Since drm_vblank_get() is what's being deprecated here, wouldn't it make more sense to write drm_crtc_vblank_get() in terms of struct drm_crtc and make drm_vblank_get() call that instead? I can't seem to find a helper to get the CRTC from an index, but it seems like that wouldn't be hard to do. I guess it doesn't matter all that much either way, though, since we could equally well make that change when drm_vblank_get() is dropped, in which case at least there's no longer a need for the reverse lookup. I'd still prefer to have i915 changes in a separate commit, but otherwise: Reviewed-by: Thierry Reding --NKoe5XOeduwbEQHU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTdG4BAAoJEN0jrNd/PrOh5GEQAIbKmtjhz55rHCUR0WOlgn02 MBo0owiO6PziyEsSJEHd7epeZlatYAMuRMUhI2Kjh0k4eLPTQsSrRDC7Df2jkPr7 7ID1ocm7o2DEWznUTyaT2V2IhJg9d7SYtnLNDatM+ex0ACAZbCFg4jRlIWNvsUTw B8T8D3eOi3wj+VhIigBB2p7P7MErXnkBS9pav9uoaFAFya896cvMBmfxzDqX52RP cFFWT9QmHr3A+WQStrlRaZKo7Y6gxylRitcC2+pFD4wuYIAAsYn6w5TEtIsVQ/Q+ mYJxyNs766J18hqQgxUrU4CpzcY9NyIR+pYbNMBmlVL/3HXb+vC8WZp0RQIIc3Mu 8i8ErErukslGNft00JEU3WlZlsicVkugl5MFffZZShy9FPpu5mzM9k6ZGp2EovX2 zo4Y7MFDt/dRcOfQSeJjbktGGkGCngCcRvm6O9spmEe/GfW8bD6fZfZlbc83RJLL UokKvErs0M8xUCLO10BBEH2gvC3mjWen+cvUMrsEXgYANrbbnIl3alBxM2G1gTAO mMR9W/jkBOAgDnrkn6ntpeo39ka82IYZDTwZHRamGkS2pD1Ka+YjDnCJQY4QaejJ F+M3YiKe2TzgYp1KnSJ/BWvYEH606i3OkbRwLiP8BEveXlpNLS/6ehS5k8Y1Drmc 1Gdq0Y6v4gpe0Hn5ZQnw =CuCI -----END PGP SIGNATURE----- --NKoe5XOeduwbEQHU-- --===============0982512389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0982512389==--