* [PATCH] drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set
@ 2020-10-27 15:03 Alex Deucher
2020-11-02 18:49 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-10-27 15:03 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Properly protect the relevant code with CONFIG_DRM_AMD_DC_DCN.
Fixes: 0b08c54bb7a3 ("drm/amd/display: Fix the display corruption issue on Navi10")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index fdb1fa72061a..843080e4c39e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -893,6 +893,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
return 0;
}
+#if defined(CONFIG_DRM_AMD_DC_DCN)
static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_addr_space_config *pa_config)
{
uint64_t pt_base;
@@ -945,6 +946,7 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
pa_config->is_hvm_enabled = 0;
}
+#endif
static int amdgpu_dm_init(struct amdgpu_device *adev)
{
@@ -952,7 +954,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct dc_callback_init init_params;
#endif
- struct dc_phy_addr_space_config pa_config;
int r;
adev->dm.ddev = adev_to_drm(adev);
@@ -1060,6 +1061,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
#if defined(CONFIG_DRM_AMD_DC_DCN)
if (adev->asic_type == CHIP_RENOIR) {
+ struct dc_phy_addr_space_config pa_config;
+
mmhub_read_system_context(adev, &pa_config);
// Call the DC init_memory func
--
2.25.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set
2020-10-27 15:03 [PATCH] drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set Alex Deucher
@ 2020-11-02 18:49 ` Alex Deucher
2020-11-02 19:13 ` Kazlauskas, Nicholas
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-11-02 18:49 UTC (permalink / raw)
To: amd-gfx list; +Cc: Alex Deucher
Ping?
Alex
On Tue, Oct 27, 2020 at 11:04 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Properly protect the relevant code with CONFIG_DRM_AMD_DC_DCN.
>
> Fixes: 0b08c54bb7a3 ("drm/amd/display: Fix the display corruption issue on Navi10")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index fdb1fa72061a..843080e4c39e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -893,6 +893,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
> return 0;
> }
>
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_addr_space_config *pa_config)
> {
> uint64_t pt_base;
> @@ -945,6 +946,7 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
> pa_config->is_hvm_enabled = 0;
>
> }
> +#endif
>
> static int amdgpu_dm_init(struct amdgpu_device *adev)
> {
> @@ -952,7 +954,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
> #ifdef CONFIG_DRM_AMD_DC_HDCP
> struct dc_callback_init init_params;
> #endif
> - struct dc_phy_addr_space_config pa_config;
> int r;
>
> adev->dm.ddev = adev_to_drm(adev);
> @@ -1060,6 +1061,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>
> #if defined(CONFIG_DRM_AMD_DC_DCN)
> if (adev->asic_type == CHIP_RENOIR) {
> + struct dc_phy_addr_space_config pa_config;
> +
> mmhub_read_system_context(adev, &pa_config);
>
> // Call the DC init_memory func
> --
> 2.25.4
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set
2020-11-02 18:49 ` Alex Deucher
@ 2020-11-02 19:13 ` Kazlauskas, Nicholas
0 siblings, 0 replies; 3+ messages in thread
From: Kazlauskas, Nicholas @ 2020-11-02 19:13 UTC (permalink / raw)
To: Alex Deucher, amd-gfx list; +Cc: Alex Deucher
On 2020-11-02 1:49 p.m., Alex Deucher wrote:
> Ping?
>
> Alex
>
> On Tue, Oct 27, 2020 at 11:04 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> Properly protect the relevant code with CONFIG_DRM_AMD_DC_DCN.
>>
>> Fixes: 0b08c54bb7a3 ("drm/amd/display: Fix the display corruption issue on Navi10")
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Regards,
Nicholas Kazlauskas
>> ---
>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index fdb1fa72061a..843080e4c39e 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -893,6 +893,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
>> return 0;
>> }
>>
>> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>> static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_addr_space_config *pa_config)
>> {
>> uint64_t pt_base;
>> @@ -945,6 +946,7 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
>> pa_config->is_hvm_enabled = 0;
>>
>> }
>> +#endif
>>
>> static int amdgpu_dm_init(struct amdgpu_device *adev)
>> {
>> @@ -952,7 +954,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>> #ifdef CONFIG_DRM_AMD_DC_HDCP
>> struct dc_callback_init init_params;
>> #endif
>> - struct dc_phy_addr_space_config pa_config;
>> int r;
>>
>> adev->dm.ddev = adev_to_drm(adev);
>> @@ -1060,6 +1061,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>>
>> #if defined(CONFIG_DRM_AMD_DC_DCN)
>> if (adev->asic_type == CHIP_RENOIR) {
>> + struct dc_phy_addr_space_config pa_config;
>> +
>> mmhub_read_system_context(adev, &pa_config);
>>
>> // Call the DC init_memory func
>> --
>> 2.25.4
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-02 19:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 15:03 [PATCH] drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set Alex Deucher
2020-11-02 18:49 ` Alex Deucher
2020-11-02 19:13 ` Kazlauskas, Nicholas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).