From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seung-Woo Kim Subject: Re: [PATCH v2 2/2] drm/msm/mdp4: Support NV12MT format in mdp4 Date: Wed, 25 Mar 2015 11:26:34 +0900 Message-ID: <55121CDA.4020703@samsung.com> References: <1426273930-12788-1-git-send-email-sviau@codeaurora.org> <1426273930-12788-3-git-send-email-sviau@codeaurora.org> <20150316080238.GA21993@phenom.ffwll.local> Reply-To: sw0312.kim@samsung.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:52253 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbbCYC0Z convert rfc822-to-8bit (ORCPT ); Tue, 24 Mar 2015 22:26:25 -0400 In-reply-to: Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Rob Clark Cc: Stephane Viau , "dri-devel@lists.freedesktop.org" , linux-arm-msm , Linux Kernel Mailing List , Beeresh Gopal , Inki Dae , Daniel Vetter , Seung-Woo Kim , m.szyprowski@samsung.com, s.nawrocki@samsung.com, k.debski@samsung.com Hello, On 2015=EB=85=84 03=EC=9B=94 25=EC=9D=BC 03:32, Rob Clark wrote: > On Mon, Mar 16, 2015 at 4:05 AM, Daniel Vetter wrot= e: >> On Fri, Mar 13, 2015 at 03:12:10PM -0400, Stephane Viau wrote: >>> From: Beeresh Gopal >>> >>> Using fb modifier flag, support NV12MT format in MDP4. >>> >>> v2: >>> - rework the modifier's description [Daniel Vetter's comment] >>> - drop .set_mode_config() callback [Rob Clark's comment] >>> >>> Signed-off-by: Beeresh Gopal >>> Signed-off-by: Stephane Viau >>> --- >>> drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 2 ++ >>> drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 22 +++++++++++++++++++= +++ >>> include/uapi/drm/drm_fourcc.h | 5 +++++ >>> 3 files changed, 29 insertions(+) >>> >>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_f= ourcc.h >>> index 188e61f..2ff79cb 100644 >>> --- a/include/uapi/drm/drm_fourcc.h >>> +++ b/include/uapi/drm/drm_fourcc.h >>> @@ -161,4 +161,9 @@ >>> * authoritative source for all of these. >>> */ >>> >>> +/* Samsung framebuffer modifiers */ >>> + >>> +/* Tiled: 64x32 pixel macroblocks */ >> >> Since this seems shared by a lot of vendors (I still don't believe S= amsung >> invented this really ...) can you please describe this thing a bit i= n more >> detail? Somewhat important how macroblocks are laid out and pixels w= ithin. >> Also with a planar format like NV12 "pixel" is a bit unclear, e.g. w= hat >> happens if you throw 10bit plane formats at this? So maybe also add = a note >> that for now this is only used together with NV12T. >=20 > + a couple folks from Samsung, since I expect they want this for > exynos as well (and might be able to help with the description) Yes, I have a plan to apply fb_modifier for exynos with kms interface o= f hdmi. >=20 > vl4 also has this format, but last I looked was rather light on the d= etails. I am not sure msm mdp uses exactly same format with exynos, but anyway v4l2 NV12MT format was introduced for exynos hw video codec. macro blocks for the format is laid z-order and each pixel data in each macro block is just normal NV12 style. I think Marek and Sylwester can help understanding the format. >=20 > http://linuxtv.org/downloads/v4l-dvb-apis/re31.html >=20 > I know up in userspace, GStreamer seems to have some support for this= format: >=20 > http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=3Df= 8d3b9b4fcc5e08b771314fa95e9ed8f750b54e6 >=20 >> Then there's the question of validating the input - stride should pr= obably >> be a full multiple of the macroblock size. Since this is a shared fo= rmat >> imo this kind of checking should be done in drm core. >=20 > afaiu, stride (and maybe even width?) should be a multiple of the > block size (but height does not) >=20 > BR, > -R >=20 >=20 >> -Daniel >> >> >>> +#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG,= 1) >>> + >>> #endif /* DRM_FOURCC_H */ >>> -- >>> Qualcomm Innovation Center, Inc. >>> >>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora= Forum, a Linux Foundation Collaborative Project >>> >> >> -- >> Daniel Vetter >> Software Engineer, Intel Corporation >> +41 (0) 79 365 57 48 - http://blog.ffwll.ch >=20 --=20 Seung-Woo Kim Samsung Software R&D Center --