From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 01/11] drm: add plane support Date: Tue, 25 Oct 2011 13:58:55 +0200 Message-ID: <20111025115855.GC2894@phenom.ffwll.local> References: <1319536026-2877-1-git-send-email-jbarnes@virtuousgeek.org> <1319536026-2877-2-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1319536026-2877-2-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Tue, Oct 25, 2011 at 11:46:56AM +0200, Jesse Barnes wrote: > Planes are a bit like half-CRTCs. They have a location and fb, but > don't drive outputs directly. Add support for handling them to the core > KMS code. > > Signed-off-by: Jesse Barnes As discussed with Jesse on irc, drm fb handling is fragile. Current rules: - fbs are not reference counted, hence when destroying we need to disable all crtcs (and now also planes) that use them. drm_framebuffer_cleanup does that atm - drivers that hold onto fbs after the kms core drops the corresponding pointer needs to hold a ref onto the underlying backing storage (like e.g. for pageflip on the to-be-flipped-out fb as long as it might still be scanned out). We need proper refcounting for these ... But for now this patch is missing the plane cleanup in drm_framebuffer_cleanup. Otherwise I think going with just the src and dst rect for set_plane is about the only sensible thing given the crazy hw out there. But I lack the knowledge about that kind of hw (and video stuff in general), so I'll refrain from slapping my r-b on these two. Cheers, Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48