<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Alex, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I already merged the branch but I have sent you the revert patch. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jasdeep</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> February 7, 2022 10:58 AM<br>
<b>To:</b> Dhillon, Jasdeep <Jasdeep.Dhillon@amd.com><br>
<b>Cc:</b> amd-gfx list <amd-gfx@lists.freedesktop.org>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Liu, Charlene <Charlene.Liu@amd.com>; Logush, Oliver <Oliver.Logush@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>;
Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Li, Roman <Roman.Li@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Lakha, Bhawanpreet
<Bhawanpreet.Lakha@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com>; Kotarac, Pavle <Pavle.Kotarac@amd.com><br>
<b>Subject:</b> Re: [PATCH 13/13] drm/amd/display: Basic support with device ID</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Fri, Feb 4, 2022 at 11:33 PM Jasdeep Dhillon <jdhillon@amd.com> wrote:<br>
><br>
> From: Oliver Logush <oliver.logush@amd.com><br>
><br>
> [why]<br>
> To get the the cyan_skillfish check working<br>
<br>
NAK. This is still not correct.<br>
<br>
><br>
> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com><br>
> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com><br>
> Acked-by: Jasdeep Dhillon <jdhillon@amd.com><br>
> Signed-off-by: Oliver Logush <oliver.logush@amd.com><br>
> ---<br>
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +++++++++++++++++--<br>
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-<br>
> .../gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-<br>
> .../gpu/drm/amd/display/include/dal_asic_id.h | 3 ++-<br>
> 4 files changed, 26 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> index 8f53c9f6b267..f5941e59e5ad 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> @@ -1014,6 +1014,14 @@ static void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin)<br>
> }<br>
> }<br>
><br>
> +bool is_skillfish_series(struct amdgpu_device *adev)<br>
> +{<br>
> + if (adev->asic_type == CHIP_CYAN_SKILLFISH || adev->pdev->revision == 0x143F) {<br>
> + return true;<br>
> + }<br>
> + return false;<br>
> +}<br>
<br>
I don't see why we need this.<br>
<br>
> +<br>
> static int dm_dmub_hw_init(struct amdgpu_device *adev)<br>
> {<br>
> const struct dmcub_firmware_header_v1_0 *hdr;<br>
> @@ -1049,7 +1057,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)<br>
> return -EINVAL;<br>
> }<br>
><br>
> - if (!has_hw_support) {<br>
> + if (is_skillfish_series(adev)) {<br>
<br>
Why this change? won't this break other asics with no hw support?<br>
<br>
> DRM_INFO("DMUB unsupported on ASIC\n");<br>
> return 0;<br>
> }<br>
> @@ -1471,6 +1479,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)<br>
> default:<br>
> break;<br>
> }<br>
> + if (is_skillfish_series(adev)) {<br>
> + init_data.flags.disable_dmcu = true;<br>
> + break;<br>
> + }<br>
<br>
Should not be necessary.<br>
<br>
> break;<br>
> }<br>
><br>
> @@ -1777,7 +1789,6 @@ static int load_dmcu_fw(struct amdgpu_device *adev)<br>
> case CHIP_VEGA10:<br>
> case CHIP_VEGA12:<br>
> case CHIP_VEGA20:<br>
> - return 0;<br>
<br>
This change seems unrelated and may break other asics.<br>
<br>
> case CHIP_NAVI12:<br>
> fw_name_dmcu = FIRMWARE_NAVI12_DMCU;<br>
> break;<br>
> @@ -1805,6 +1816,9 @@ static int load_dmcu_fw(struct amdgpu_device *adev)<br>
> default:<br>
> break;<br>
> }<br>
> + if (is_skillfish_series(adev)) {<br>
> + return 0;<br>
> + }<br>
<br>
Why do we need this?<br>
<br>
> DRM_ERROR("Unsupported ASIC type: 0x%X\n", adev->asic_type);<br>
> return -EINVAL;<br>
> }<br>
> @@ -4515,6 +4529,12 @@ static int dm_early_init(void *handle)<br>
> adev->mode_info.num_dig = 6;<br>
> break;<br>
> default:<br>
> + if (is_skillfish_series(adev)) {<br>
> + adev->mode_info.num_crtc = 2;<br>
> + adev->mode_info.num_hpd = 2;<br>
> + adev->mode_info.num_dig = 2;<br>
> + break;<br>
> + }<br>
<br>
Same here.<br>
<br>
> #if defined(CONFIG_DRM_AMD_DC_DCN)<br>
> switch (adev->ip_versions[DCE_HWIP][0]) {<br>
> case IP_VERSION(2, 0, 2):<br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h<br>
> index e35977fda5c1..13875d669acd 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h<br>
> @@ -82,7 +82,7 @@ struct common_irq_params {<br>
> enum dc_irq_source irq_src;<br>
> atomic64_t previous_timestamp;<br>
> };<br>
> -<br>
> +bool is_skillfish_series(struct amdgpu_device *adev);<br>
> /**<br>
> * struct dm_compressor_info - Buffer info used by frame buffer compression<br>
> * @cpu_addr: MMIO cpu addr<br>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c<br>
> index b36bae4b5bc9..318d381e2910 100644<br>
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c<br>
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c<br>
> @@ -135,7 +135,7 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)<br>
><br>
> case FAMILY_NV:<br>
> dc_version = DCN_VERSION_2_0;<br>
> - if (asic_id.chip_id == DEVICE_ID_NV_13FE) {<br>
> + if (asic_id.chip_id == DEVICE_ID_NV_NAVI10_LITE_P_13FE || asic_id.chip_id == DEVICE_ID_NV_NAVI10_LITE_P_143F) {<br>
<br>
I think these last two hunks are the only ones you need. The rest<br>
should be unnecessary.<br>
<br>
> dc_version = DCN_VERSION_2_01;<br>
> break;<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/display/include/dal_asic_id.h b/drivers/gpu/drm/amd/display/include/dal_asic_id.h<br>
> index e4a2dfacab4c..37ec6343dbd6 100644<br>
> --- a/drivers/gpu/drm/amd/display/include/dal_asic_id.h<br>
> +++ b/drivers/gpu/drm/amd/display/include/dal_asic_id.h<br>
> @@ -211,7 +211,8 @@ enum {<br>
> #ifndef ASICREV_IS_GREEN_SARDINE<br>
> #define ASICREV_IS_GREEN_SARDINE(eChipRev) ((eChipRev >= GREEN_SARDINE_A0) && (eChipRev < 0xFF))<br>
> #endif<br>
> -#define DEVICE_ID_NV_13FE 0x13FE // CYAN_SKILLFISH<br>
> +#define DEVICE_ID_NV_NAVI10_LITE_P_13FE 0x13FE // CYAN_SKILLFISH<br>
> +#define DEVICE_ID_NV_NAVI10_LITE_P_143F 0x143F<br>
> #define FAMILY_VGH 144<br>
> #define DEVICE_ID_VGH_163F 0x163F<br>
> #define VANGOGH_A0 0x01<br>
> --<br>
> 2.25.1<br>
><br>
</div>
</span></font></div>
</div>
</body>
</html>