<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Sharma, Shashank
<br>
<b>Sent:</b> Thursday, February 8, 2018 12:17 PM<br>
<b>To:</b> Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org<br>
<b>Cc:</b> maarten.lankhorst@linux.intel.com; Kamath, Sunil <sunil.kamath@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Kumar, Mahesh1 <mahesh1.kumar@intel.com><br>
<b>Subject:</b> Re: [PATCH 03/16] drm/i915/skl+: add NV12 in skl_format_to_fourcc<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Regards<span style="font-size:12.0pt"><o:p></o:p></span></p>
<p>Shashank<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 2/8/2018 10:02 AM, Sharma, Shashank wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
<br>
On 2/8/2018 8:50 AM, Srinivas, Vidya wrote: <br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">-----Original Message----- <br>
From: Sharma, Shashank <br>
Sent: Wednesday, February 7, 2018 9:22 PM <br>
To: Srinivas, Vidya <a href="mailto:vidya.srinivas@intel.com"><vidya.srinivas@intel.com></a>; intel-
<br>
<a href="mailto:gfx@lists.freedesktop.org">gfx@lists.freedesktop.org</a> <br>
Cc: <a href="mailto:maarten.lankhorst@linux.intel.com">maarten.lankhorst@linux.intel.com</a>; Kamath, Sunil
<br>
<a href="mailto:sunil.kamath@intel.com"><sunil.kamath@intel.com></a>; Shankar, Uma
<a href="mailto:uma.shankar@intel.com"><uma.shankar@intel.com></a>; <br>
Kumar, Mahesh1 <a href="mailto:mahesh1.kumar@intel.com"><mahesh1.kumar@intel.com></a>
<br>
Subject: Re: [PATCH 03/16] drm/i915/skl+: add NV12 in <br>
skl_format_to_fourcc <br>
<br>
Regards <br>
<br>
Shashank <br>
<br>
<br>
On 2/6/2018 6:28 PM, Vidya Srinivas wrote: <br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">From: Mahesh Kumar <a href="mailto:mahesh1.kumar@intel.com">
<mahesh1.kumar@intel.com></a> <br>
<br>
Add support of recognizing DRM_FORMAT_NV12 from plane_format <o:p></o:p></p>
</blockquote>
<p class="MsoNormal">register <br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">value. <br>
<br>
Signed-off-by: Mahesh Kumar <a href="mailto:mahesh1.kumar@intel.com"><mahesh1.kumar@intel.com></a>
<br>
--- <br>
drivers/gpu/drm/i915/intel_display.c | 2 ++ <br>
1 file changed, 2 insertions(+) <br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_display.c <br>
b/drivers/gpu/drm/i915/intel_display.c <br>
index 60ba5bb..e3a6a7f 100644 <br>
--- a/drivers/gpu/drm/i915/intel_display.c <br>
+++ b/drivers/gpu/drm/i915/intel_display.c <br>
@@ -2626,6 +2626,8 @@ static int skl_format_to_fourcc(int format, bool <o:p></o:p></p>
</blockquote>
<p class="MsoNormal">rgb_order, bool alpha) <br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> switch (format) { <br>
case PLANE_CTL_FORMAT_RGB_565: <br>
return DRM_FORMAT_RGB565; <br>
+ case PLANE_CTL_FORMAT_NV12: <br>
+ return DRM_FORMAT_NV12; <o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt">I dont think this is correct, the case PLANE_CTL_FORMAT_NV12 is defined as
<br>
(1 << 24) but when I check bspec definition, 24th bit is set for <br>
P010/12/16 formats. AFAIK NV12 is 8 bit format whereas P0xx formats are <br>
10/12/16 bit formats (they both are YCBCR 4:2:0 of course). This means we <br>
have mixed NV12 format with P0xx formats. When I checked the definition <br>
of DRM_FORMAT_NV12, I am not sure if that's intended for this. Ville, I saw <br>
that the DRM_FORMAT_NV12 definition was added by you, can you please <br>
comment if this is the right usage ? <o:p></o:p></p>
</blockquote>
<p class="MsoNormal">Upto Gen10 24-27 bits of PLANE_CTL will be used for format. ICL onwards 23rd bit
<br>
is also used. PLANE_CTL_FORMAT_MASK has been defined in i915_reg.h <br>
and mapping will be same if 23rd bit is 0. For NV12, 1<< 24 thus holds good <br>
for all Gen. <o:p></o:p></p>
</blockquote>
<p class="MsoNormal">That's not my point. What I want to say is, as per bspec (1 << 24) is for P010/P012/P016 formats, not NV12. NV12 is 8 bit YCBCR 4:2:0 format whereas P010/012/016 are 10,12 and 16 bit YCBCR 4:2:0 formats. So I was not sure if that should
be called NV12 and hence I was not sure if we should return DRM_FORMAT_NV12 for the same.
<br>
- Shashank <o:p></o:p></p>
</blockquote>
<p class="MsoNormal">What I mean to say here is, the check (1 << 24) is not good enough for all NV12, as you have to use it as if (mask == YCBCR_420_FORMAT_NV12) not (mask & YCBCR_420_FORMAT_NV12).
<br>
But if that's how its intended to be used for future addition of P010/012/016, then I guess you can bypass this comment, but please make sure you differentiate NV12 with those formats.
<br>
- Shashank <o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Sure thank u, will take care when P0xx gets added.<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"> default:
<br>
case PLANE_CTL_FORMAT_XRGB_8888: <br>
if (rgb_order) { <o:p></o:p></span></p>
</blockquote>
</blockquote>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>