From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylwester Nawrocki Subject: Re: [PATCH libdrm] libdrm: update drm/drm_fourcc.h from kernel to add multi plane formats Date: Fri, 06 Apr 2012 13:22:06 +0200 Message-ID: <4F7ED1DE.7040608@samsung.com> References: <1333076090-28881-1-git-send-email-sw0312.kim@samsung.com> <20120330101258.GV4917@intel.com> <20120405181350.GI4917@intel.com> <001d01cd13bb$48f23f60$dad6be20$%dae@samsung.com> <20120406074339.GD2316@sci.fi> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by gabe.freedesktop.org (Postfix) with ESMTP id E49B49E91D for ; Fri, 6 Apr 2012 04:32:11 -0700 (PDT) Received: from euspt2 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0M22008YD28DUC30@mailout3.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 06 Apr 2012 12:21:49 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M2200G9C28TZZ@spt2.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 06 Apr 2012 12:22:05 +0100 (BST) In-reply-to: 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: Kyungmin Park Cc: Seung-Woo Kim , dri-devel@lists.freedesktop.org, Inki Dae , kyungmin.park@samsung.com, airlied@redhat.com List-Id: dri-devel@lists.freedesktop.org Hello, On 04/06/2012 11:22 AM, Kyungmin Park wrote: > + V4L2 develper > Sylwester, please give your opinions? How to handle it at v4l2 side. > = > Thank you, > Kyungmin Park > = > On Apr 6, 2012 12:44 AM, "Ville Syrj=E4l=E4" > wrote: > = > On Fri, Apr 06, 2012 at 03:05:36PM +0900, Inki Dae wrote: > > Hi Ville, > > > > > -----Original Message----- > > > From: Ville Syrj=E4l=E4 [mailto:ville.syrjala@linux.intel.com > ] > > > Sent: Friday, April 06, 2012 3:14 AM > > > To: airlied@redhat.com > > > Cc: inki.dae@samsung.com ; > kyungmin.park@samsung.com ; dri- > > > devel@lists.freedesktop.org ; > Seung-Woo Kim > > > Subject: Re: [PATCH libdrm] libdrm: update drm/drm_fourcc.h from = kernel to > > > add multi plane formats > > > > > > On Fri, Mar 30, 2012 at 01:12:58PM +0300, Ville Syrj=E4l=E4 wrote: > > > > On Fri, Mar 30, 2012 at 11:54:50AM +0900, Seung-Woo Kim wrote: > > > > > Multi buffer plane pixel formats are added as like kernel hea= der. > > > > > > > > > > Signed-off-by: Seung-Woo Kim > > > > > > --- > > > > > include/drm/drm_fourcc.h | 7 +++++++ > > > > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > > > > > > > diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourc= c.h > > > > > index 85facb0..7cfd95a 100644 > > > > > --- a/include/drm/drm_fourcc.h > > > > > +++ b/include/drm/drm_fourcc.h > > > > > @@ -107,6 +107,10 @@ > > > > > #define DRM_FORMAT_NV16 fourcc_code('N', 'V',= '1', > '6') /* > > > 2x1 subsampled Cr:Cb plane */ > > > > > #define DRM_FORMAT_NV61 fourcc_code('N', 'V',= '6', > '1') /* > > > 2x1 subsampled Cb:Cr plane */ > > > > > > > > > > +/* 2 non contiguous plane YCbCr */ > > > > > +#define DRM_FORMAT_NV12M fourcc_code('N', 'M', '1', '2= ') /* 2x2 > > > subsampled Cr:Cb plane */ > > > > > > > > NAK. DRM_FORMAT_NV12 handles this just fine. > > > > > > And I just realized that I was already too late with my NAK since= this a > > > libdrm patch. Apparently the kernel drm_fourcc.h changes were snu= ck in > > > via some backdoor without review. Sigh. > > > > > > > We had already requested review for it. for this you can refer to l= ink > > below: > > > > http://lists.freedesktop.org/archives/dri-devel/2011-December/01765= 4.html > = > I see. I couldn't find it in my work mailbox for some reason, and I > don't remember having seen the patch before. I suppose I just missed = it > due to Christmas vacations, and was too blind to see it in my mailbox. > Also google decicded to filter my search results too much, so I didn't > spot it via the web archives either. I'm sorry for the false accusati= on. > = > > > So they're now in Linus's tree. But looks like format_check() was= never > > > updated to accept them, so there's no way anyone could actually b= e using > > > them. So Dave, can we still remove them from the kernel header? > > > > > > > Yes, right. these formats aren't used for any SoCs except Exynos se= ries yet > > but just we are first. I think they should be added because anyone = may use > > them someday at least possible. > = > Since DRM_FORMAT_NV12M is _identical_ to DRM_FORMAT_NV12, I see no po= int > in adding it (similarly for YUV420M vs. YUV420). In V4L2 the fourcc also determines the number of memory planes in the frame buffer. The multi-planar API has been added to support devices with odd alignment requirements (image components, like Y/CbCr in separate physical memory buffers) for which it was difficult to map whole frame into contiguo= us user memory region. Here is some excample: http://linuxtv.org/downloads/v4l-dvb-apis/V4L2-PIX-FMT-NV12M.html I'm not terribly familiar with the buffer structure in DRM, maybe there are better ways to handle something like this in DRI. > -- > Ville Syrj=E4l=E4 > syrjala@sci.fi > http://www.sci.fi/~syrjala/ Regards, -- = Sylwester Nawrocki Samsung Poland R&D Center