From: Joonyoung Shim <jy0922.shim@samsung.com>
To: airlied@gmail.com, Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: add checking DRM_FORMAT_NV12MT
Date: Fri, 29 Aug 2014 16:21:15 +0900 [thread overview]
Message-ID: <540029EB.9040905@samsung.com> (raw)
In-Reply-To: <20140728160832.GM27580@intel.com>
Hi Dave,
On 07/29/2014 01:08 AM, Ville Syrjälä wrote:
> On Mon, Jul 28, 2014 at 11:56:59AM -0400, Rob Clark wrote:
>> On Mon, Jul 28, 2014 at 12:47 AM, Joonyoung Shim
>> <jy0922.shim@samsung.com> wrote:
>>> If user NV12MT uses as pixel format, the Addfb2 ioctl is failed because
>>> of missing to check DRM_FORMAT_NV12MT. The NV12MT pixel format is
>>> supported by exynos4 and some qualcomm chipset and it is used by exynos
>>> drm driver.
If there is no any objection, could you merge this?
Thanks.
>>
>> tbh, format_check() should probably just be made to respect the
>> formats advertised by all the planes..
>
> That can't be done until all drivers are converted to primary/cursor
> planes. Also I'm not sure if we should allow it even then since that
> would make it quite easy to sneak in new driver specific formats
> without anyone necessarily reviewing them.
>
>>
>> BR,
>> -R
>>
>>> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>>> ---
>>> drivers/gpu/drm/drm_crtc.c | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
>>> index 1ccf5cb..5d7bd49 100644
>>> --- a/drivers/gpu/drm/drm_crtc.c
>>> +++ b/drivers/gpu/drm/drm_crtc.c
>>> @@ -2960,6 +2960,7 @@ static int format_check(const struct drm_mode_fb_cmd2 *r)
>>> case DRM_FORMAT_NV61:
>>> case DRM_FORMAT_NV24:
>>> case DRM_FORMAT_NV42:
>>> + case DRM_FORMAT_NV12MT:
>>> case DRM_FORMAT_YUV410:
>>> case DRM_FORMAT_YVU410:
>>> case DRM_FORMAT_YUV411:
>>> @@ -4800,6 +4801,7 @@ int drm_format_num_planes(uint32_t format)
>>> case DRM_FORMAT_NV61:
>>> case DRM_FORMAT_NV24:
>>> case DRM_FORMAT_NV42:
>>> + case DRM_FORMAT_NV12MT:
>>> return 2;
>>> default:
>>> return 1;
>>> @@ -4835,6 +4837,7 @@ int drm_format_plane_cpp(uint32_t format, int plane)
>>> case DRM_FORMAT_NV61:
>>> case DRM_FORMAT_NV24:
>>> case DRM_FORMAT_NV42:
>>> + case DRM_FORMAT_NV12MT:
>>> return plane ? 2 : 1;
>>> case DRM_FORMAT_YUV410:
>>> case DRM_FORMAT_YVU410:
>>> @@ -4878,6 +4881,7 @@ int drm_format_horz_chroma_subsampling(uint32_t format)
>>> case DRM_FORMAT_NV21:
>>> case DRM_FORMAT_NV16:
>>> case DRM_FORMAT_NV61:
>>> + case DRM_FORMAT_NV12MT:
>>> case DRM_FORMAT_YUV422:
>>> case DRM_FORMAT_YVU422:
>>> case DRM_FORMAT_YUV420:
>>> @@ -4907,6 +4911,7 @@ int drm_format_vert_chroma_subsampling(uint32_t format)
>>> case DRM_FORMAT_YVU420:
>>> case DRM_FORMAT_NV12:
>>> case DRM_FORMAT_NV21:
>>> + case DRM_FORMAT_NV12MT:
>>> return 2;
>>> default:
>>> return 1;
>>> --
>>> 1.8.1.2
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
prev parent reply other threads:[~2014-08-29 7:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 4:47 [PATCH] drm: add checking DRM_FORMAT_NV12MT Joonyoung Shim
2014-07-28 15:56 ` Rob Clark
2014-07-28 16:08 ` Ville Syrjälä
2014-08-29 7:21 ` Joonyoung Shim [this message]
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=540029EB.9040905@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--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.