<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
mso-ligatures:none;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 137.75pt 72.0pt 137.7pt;}
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 lang="ZH-CN" link="#0563C1" vlink="#954F72" style="word-wrap:break-word;text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> -----Original Message-----</span></p>
<p class="MsoPlainText"><span lang="EN-US">> From: Maxime Ripard <mripard@kernel.org></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Sent: 2024</span><span style="font-family:等线">年</span><span lang="EN-US">1</span><span style="font-family:等线">月</span><span lang="EN-US">31</span><span style="font-family:等线">日</span><span lang="EN-US"> 21:24</span></p>
<p class="MsoPlainText"><span lang="EN-US">> To: Keith Zhao <keith.zhao@starfivetech.com></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Cc: devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> linux-kernel@vger.kernel.org; linux-riscv@lists.infradead.org;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> tzimmermann@suse.de; airlied@gmail.com; krzysztof.kozlowski+dt@linaro.org;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> William Qiu <william.qiu@starfivetech.com>; Xingyu Wu</span></p>
<p class="MsoPlainText"><span lang="EN-US">> <xingyu.wu@starfivetech.com>; paul.walmsley@sifive.com;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> aou@eecs.berkeley.edu; palmer@dabbelt.com; p.zabel@pengutronix.de;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> Shengyang Chen <shengyang.chen@starfivetech.com>; Jack Zhu</span></p>
<p class="MsoPlainText"><span lang="EN-US">> <jack.zhu@starfivetech.com>; Changhuang Liang</span></p>
<p class="MsoPlainText"><span lang="EN-US">> <changhuang.liang@starfivetech.com>; maarten.lankhorst@linux.intel.com</span></p>
<p class="MsoPlainText"><span lang="EN-US">> Subject: Re: [v3 4/6] drm/vs: Add KMS crtc&plane</span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> On Wed, Jan 31, 2024 at 09:33:06AM +0000, Keith Zhao wrote:</span></p>
<p class="MsoPlainText"><span lang="EN-US">> ></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > -----</span><span style="font-family:等线">邮件原件</span><span lang="EN-US">-----</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > </span><span style="font-family:等线">发件人</span><span lang="EN-US">: Maxime Ripard <<a href="mailto:mripard@kernel.org"><span style="color:windowtext;text-decoration:none">mripard@kernel.org</span></a>></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > </span><span style="font-family:等线">发送时间</span><span lang="EN-US">: 2023</span><span style="font-family:等线">年</span><span lang="EN-US">12</span><span style="font-family:等线">月</span><span lang="EN-US">6</span><span style="font-family:等线">日</span><span lang="EN-US">
16:56</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > </span><span style="font-family:等线">收件人</span><span lang="EN-US">: Keith Zhao <<a href="mailto:keith.zhao@starfivetech.com"><span style="color:windowtext;text-decoration:none">keith.zhao@starfivetech.com</span></a>></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > </span><span style="font-family:等线">抄送</span><span lang="EN-US">:
<a href="mailto:devicetree@vger.kernel.org"><span style="color:windowtext;text-decoration:none">devicetree@vger.kernel.org</span></a>;
<a href="mailto:dri-devel@lists.freedesktop.org"><span style="color:windowtext;text-decoration:none">dri-devel@lists.freedesktop.org</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:linux-kernel@vger.kernel.org">
<span style="color:windowtext;text-decoration:none">linux-kernel@vger.kernel.org</span></a>;
<a href="mailto:linux-riscv@lists.infradead.org"><span style="color:windowtext;text-decoration:none">linux-riscv@lists.infradead.org</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:tzimmermann@suse.de">
<span style="color:windowtext;text-decoration:none">tzimmermann@suse.de</span></a>;
<a href="mailto:airlied@gmail.com"><span style="color:windowtext;text-decoration:none">airlied@gmail.com</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:krzysztof.kozlowski+dt@linaro.org">
<span style="color:windowtext;text-decoration:none">krzysztof.kozlowski+dt@linaro.org</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > William Qiu <<a href="mailto:william.qiu@starfivetech.com"><span style="color:windowtext;text-decoration:none">william.qiu@starfivetech.com</span></a>>; Xingyu Wu</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <<a href="mailto:xingyu.wu@starfivetech.com"><span style="color:windowtext;text-decoration:none">xingyu.wu@starfivetech.com</span></a>>;
<a href="mailto:paul.walmsley@sifive.com"><span style="color:windowtext;text-decoration:none">paul.walmsley@sifive.com</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:aou@eecs.berkeley.edu">
<span style="color:windowtext;text-decoration:none">aou@eecs.berkeley.edu</span></a>;
<a href="mailto:palmer@dabbelt.com"><span style="color:windowtext;text-decoration:none">palmer@dabbelt.com</span></a>;
<a href="mailto:p.zabel@pengutronix.de"><span style="color:windowtext;text-decoration:none">p.zabel@pengutronix.de</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > Shengyang Chen <<a href="mailto:shengyang.chen@starfivetech.com"><span style="color:windowtext;text-decoration:none">shengyang.chen@starfivetech.com</span></a>>; Jack Zhu</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <<a href="mailto:jack.zhu@starfivetech.com"><span style="color:windowtext;text-decoration:none">jack.zhu@starfivetech.com</span></a>>; Changhuang Liang</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <<a href="mailto:changhuang.liang@starfivetech.com"><span style="color:windowtext;text-decoration:none">changhuang.liang@starfivetech.com</span></a>>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:maarten.lankhorst@linux.intel.com">
<span style="color:windowtext;text-decoration:none">maarten.lankhorst@linux.intel.com</span></a>;</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > <a href="mailto:suijingfeng@loongson.cn">
<span style="color:windowtext;text-decoration:none">suijingfeng@loongson.cn</span></a></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > </span><span style="font-family:等线">主题</span><span lang="EN-US">: Re: [v3 4/6] drm/vs: Add KMS crtc&plane</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > ></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > On Mon, Dec 04, 2023 at 08:33:13PM +0800, Keith Zhao wrote:</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > +static const struct vs_plane_info dc_hw_planes_rev0[PLANE_NUM] = {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Primary",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = PRIMARY_PLANE_0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_PRIMARY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = ARRAY_SIZE(format_modifier0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = format_modifier0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = DRM_MODE_ROTATE_0 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_90 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_180 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_270 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_X |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_Y,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = FRAC_16_16(1, 3),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = FRAC_16_16(10, 1),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Overlay",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = OVERLAY_PLANE_0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_OVERLAY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = ARRAY_SIZE(format_modifier0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = format_modifier0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = DRM_MODE_ROTATE_0 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_90 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_180 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_270 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_X |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_Y,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = FRAC_16_16(1, 3),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = FRAC_16_16(10, 1),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 1,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Overlay_1",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = OVERLAY_PLANE_1,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_OVERLAY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers =</span></p>
<p class="MsoPlainText"><span lang="EN-US">> ARRAY_SIZE(secondary_format_modifiers),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = secondary_format_modifiers,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 2,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Primary_1",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = PRIMARY_PLANE_1,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_PRIMARY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = ARRAY_SIZE(format_modifier0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = format_modifier0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = DRM_MODE_ROTATE_0 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_90 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_180 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_270 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_X |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_Y,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = FRAC_16_16(1, 3),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = FRAC_16_16(10, 1),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 3,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Overlay_2",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = OVERLAY_PLANE_2,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_OVERLAY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = ARRAY_SIZE(format_modifier0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = format_modifier0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = DRM_MODE_ROTATE_0 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_90 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_180 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_ROTATE_270 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_X |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_MODE_REFLECT_Y,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = FRAC_16_16(1, 3),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = FRAC_16_16(10, 1),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 4,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Overlay_3",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = OVERLAY_PLANE_3,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_OVERLAY,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(primary_overlay_format0),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = primary_overlay_format0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers =</span></p>
<p class="MsoPlainText"><span lang="EN-US">> ARRAY_SIZE(secondary_format_modifiers),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = secondary_format_modifiers,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 4096,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_PREMULTI) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_MODE_BLEND_COVERAGE),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + BIT(DRM_COLOR_YCBCR_BT2020),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = DEGAMMA_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 5,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Cursor",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = CURSOR_PLANE_0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_CURSOR,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(cursor_formats),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = cursor_formats,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = NULL,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 32,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 32,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 64,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 64,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 255,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "Cursor_1",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .id = CURSOR_PLANE_1,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .type = DRM_PLANE_TYPE_CURSOR,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_formats = ARRAY_SIZE(cursor_formats),</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .formats = cursor_formats,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .num_modifiers = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .modifiers = NULL,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_width = 32,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_height = 32,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_width = 64,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_height = 64,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .rotation = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .degamma_size = 0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .min_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_scale = DRM_PLANE_NO_SCALING,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .zpos = 255,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .watermark = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_mgmt = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .roi = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + },</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > +};</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > +</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > +static const struct vs_dc_info dc8200_info = {</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .name = "DC8200",</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .panel_num = 2,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .plane_num = 8,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .planes = dc_hw_planes_rev0,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .layer_num = 6,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .max_bpc = 10,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .color_formats = DRM_COLOR_FORMAT_RGB444 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_COLOR_FORMAT_YCBCR444 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_COLOR_FORMAT_YCBCR422 |</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + DRM_COLOR_FORMAT_YCBCR420,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .gamma_size = GAMMA_EX_SIZE,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .gamma_bits = 12,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .pitch_alignment = 128,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .pipe_sync = false,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .background = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .panel_sync = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > + .cap_dec = true,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > > +};</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > ></span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > I really think that entire thing is to workaround a suboptimal device tree</span></p>
<p class="MsoPlainText"><span lang="EN-US">> binding.</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > You should have two CRTCs in the device tree, you'll probe twice,</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > > and you won't get to do that whole dance.</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > ></span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> > I tried to modify it according to this idea Found it too difficult In</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > terms of hardware, the two crtc designs are too close to separate, and</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > they are even designed into the same reg with different bits</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > representing crtc0 and crtc1. It seems not easy to described the 2</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > ctrc hardware by 2 device nodes</span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> What are these bits doing?</span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><img border="0" width="810" height="449" style="width:8.4375in;height:4.677in" id="Picture_x0020_1" src="cid:image001.png@01DA54F5.ECEA9C10"></span><span lang="EN-US" style="color:black"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">For example:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">like this , bit0 and bit1 match ctrc0 and crtc1 , it is used to start crtc<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">A similar situation exists for other register definitions.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">Another case is that ctrc0 and crtc1 have the same function and their offset is continuous,
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">instead of crtc0 being a continuous area, crtc1 being a continuous area<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">reg:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">crtc0 X<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">crtc1 X+4<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">crtc0 X+8<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">crtc1 X+12<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black">if to </span><span lang="EN-US">make it two separate devices, the device node dts reg attribute would be complex<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US" style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> > The idea is to avoid a whole dance I don't know if I understand</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > correctly about whole dance. Is it means I create 2 ctrc and 8 plane</span></p>
<p class="MsoPlainText"><span lang="EN-US">> > in the dc_bind?</span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> Yeah, you should strive to make it two separate devices.</span></p>
<p class="MsoPlainText"><span lang="EN-US">> </span></p>
<p class="MsoPlainText"><span lang="EN-US">> Maxime</span></p>
</div>
</body>
</html>