From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH 4/4] drm: Renesas SH Mobile DRM driver Date: Wed, 30 May 2012 16:45:13 +0200 Message-ID: <4FC63279.10900@metafoo.de> References: <1338381179-13290-1-git-send-email-laurent.pinchart@ideasonboard.com> <1338381179-13290-5-git-send-email-laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-out-102.synserver.de (smtp-out-102.synserver.de [212.40.185.102]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FCC49E954 for ; Wed, 30 May 2012 07:41:58 -0700 (PDT) In-Reply-To: <1338381179-13290-5-git-send-email-laurent.pinchart@ideasonboard.com> 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: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 05/30/2012 02:32 PM, Laurent Pinchart wrote: > [...] > + for (i = 0; i < (format->yuv ? 2 : 1); ++i) { > + obj = drm_gem_object_lookup(dev, file_priv, > + mode_cmd->handles[i]); > + if (obj == NULL) { > + dev_dbg(dev->dev, "GEM object %u not found\n", > + mode_cmd->handles[i]); > + ret = -ENOENT; > + goto error; > + } > + sfb->sobj[i] = to_shmob_gem_object(obj); > + } > + I added multi-plane support the cma fb helper functions and it seems to work. But all other DRM drivers seem to assume that multi-plane formats still only have a single buffer, while yours seems to assume that there is a plane for each buffer. The exception is the Exynos driver, but it added a new set of formats which are identical to the other formats, but use one buffer per plane. So I'm not sure how to implement this correctly in a generic fashion. - Lars