All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: 김승우 <sw0312.kim@samsung.com>
Cc: inki.dae@samsung.com, kyungmin.park@samsung.com,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm] libdrm: update drm/drm_fourcc.h from kernel to add multi plane formats
Date: Fri, 30 Mar 2012 15:13:48 +0300	[thread overview]
Message-ID: <20120330121348.GY4917@intel.com> (raw)
In-Reply-To: <4F7593E4.5060207@samsung.com>

On Fri, Mar 30, 2012 at 08:07:16PM +0900, 김승우 wrote:
> Hi Ville,
> 
> I skipped explanation about NV12M and other two formats because these
> formats are already in kernel drm_fourcc.h.
> 
> I think it is better to add a difference between NV12 and NV12M here.
> 
> NV12M has Y plane and CbCr plane and these are in non contiguous memory
> region. Compared with NV12, NV12M's memory shape is like following.
> NV12  : ______(Y)(CbCr)_______
> NV12M : __(Y)_ ..... _(CbCr)__
> 
> Y and CbCr plane of NV12 can be expressed with one memory address and
> offset of each plane. but NV12M needs memory address of each plane.

Yes, I know the difference between NV12 and NV12M. But that doesn't
change the fact that you can already represent NV12M with
DRM_FORMAT_NV12 (hint handles[], offsets[]). Maybe I should have named
it DRM_FORMAT_YUV420_2P or something like that. Anyone have a time
machine I could borrow?

> On 2012년 03월 30일 19:12, Ville Syrjälä 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 header.
> >>
> >> Signed-off-by: Seung-Woo Kim<sw0312.kim@samsung.com>
> >> ---
> >>   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_fourcc.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.
> >
> 
> Exynos soc supports two kinds of memory shape explained above, so two
> different types are need for exynos soc.
> 
> >> +#define DRM_FORMAT_NV12MT	fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */
> > This one is more difficult. Until now tiling was always handled in
> > driver specific manner. OTOH if this format is really supported by
> > different devices from multiple vendors, then it would probably
> > make sense to add it as a standard format.
> >
> Exynos soc also supports normal and tiled pixel data and pixel data is 
> shared
> between hw blocks for example from scaler to hdmi.
> So driver can not handle it internally.

If it's all in one driver, it surely can. And even with multiple drivers
you could still pass that information via some kernel internal mechanism.

I'm not opposed to supporting such layouts, but I'm just worried that
tomorrow someone comes up a new device that supports 100 new tiling
layouts for some format, and then we need to add all of them as separate
DRM_FORMATs. And there is already plenty of hardware out there that can
do different tiled layouts to yours, in fact I have some on my desk even
now.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2012-03-30 12:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30  2:54 [PATCH libdrm] libdrm: update drm/drm_fourcc.h from kernel to add multi plane formats Seung-Woo Kim
2012-03-30 10:12 ` Ville Syrjälä
2012-03-30 11:07   ` 김승우
2012-03-30 12:13     ` Ville Syrjälä [this message]
2012-03-30 11:09   ` Marcus Lorentzon
2012-04-06 20:04     ` Sylwester Nawrocki
2012-04-05 18:13   ` Ville Syrjälä
2012-04-06  0:13     ` Rob Clark
2012-04-06  6:05     ` Inki Dae
2012-04-06  7:43       ` Ville Syrjälä
2012-04-06  9:22         ` Kyungmin Park
2012-04-06 11:22           ` Sylwester Nawrocki
2012-04-07  6:01         ` daeinki

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=20120330121348.GY4917@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=sw0312.kim@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.