Skip to contentSkip to conversation

drm/amdgpu: disable vga render in dce hw_init

PATCH In review Alex Deucher 2 participants 2 messages Jun 19, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: disable vga render in dce hw_init

This got dropped accidently with the fb location changes, but for some reason, this doesn't seem to cause an issue on all cards which is why I never saw it despite extensive testing. I suspect it may only be an issue on systems with a legacy sbios that enable vga.

---
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c  | 2 ++
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c  | 2 ++
 4 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +2 -0
index 884f22f..712dfd3 100644
@@ -2894,6 +2894,8 @@ static int dce_v10_0_hw_init(void *handle)
 
 	dce_v10_0_init_golden_registers(adev);
 
+	/* disable vga render */
+	dce_v10_0_set_vga_render_state(adev, false);
 	/* init dig PHYs, disp eng pll */
 	amdgpu_atombios_encoder_init_dig(adev);
 	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +2 -0
index 15208a5..406fe66 100644
@@ -3010,6 +3010,8 @@ static int dce_v11_0_hw_init(void *handle)
 
 	dce_v11_0_init_golden_registers(adev);
 
+	/* disable vga render */
+	dce_v11_0_set_vga_render_state(adev, false);
 	/* init dig PHYs, disp eng pll */
 	amdgpu_atombios_crtc_powergate_init(adev);
 	amdgpu_atombios_encoder_init_dig(adev);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +2 -0
index af0b96c..1e28f14 100644
@@ -2759,6 +2759,8 @@ static int dce_v6_0_hw_init(void *handle)
 	int i;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	/* disable vga render */
+	dce_v6_0_set_vga_render_state(adev, false);
 	/* init dig PHYs, disp eng pll */
 	amdgpu_atombios_encoder_init_dig(adev);
 	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +2 -0
index b7079f8..e34335f 100644
@@ -2792,6 +2792,8 @@ static int dce_v8_0_hw_init(void *handle)
 	int i;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	/* disable vga render */
+	dce_v8_0_set_vga_render_state(adev, false);
 	/* init dig PHYs, disp eng pll */
 	amdgpu_atombios_encoder_init_dig(adev);
 	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1497907778-14337-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

This fixes display regressions on my MSI RX480 Gaming X

Quoted 58 lines · Alex Deucher

This got dropped accidently with the fb location changes, but for some reason, this doesn't seem to cause an issue on all cards which is why I never saw it despite extensive testing. I suspect it may only be an issue on systems with a legacy sbios that enable vga.

---
  drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 ++
  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 ++
  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c  | 2 ++
  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c  | 2 ++
  4 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +2 -0
index 884f22f..712dfd3 100644
@@ -2894,6 +2894,8 @@ static int dce_v10_0_hw_init(void *handle)
 
  	dce_v10_0_init_golden_registers(adev);
 
+	/* disable vga render */
+	dce_v10_0_set_vga_render_state(adev, false);
  	/* init dig PHYs, disp eng pll */
  	amdgpu_atombios_encoder_init_dig(adev);
  	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +2 -0
index 15208a5..406fe66 100644
@@ -3010,6 +3010,8 @@ static int dce_v11_0_hw_init(void *handle)
 
  	dce_v11_0_init_golden_registers(adev);
 
+	/* disable vga render */
+	dce_v11_0_set_vga_render_state(adev, false);
  	/* init dig PHYs, disp eng pll */
  	amdgpu_atombios_crtc_powergate_init(adev);
  	amdgpu_atombios_encoder_init_dig(adev);
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +2 -0
index af0b96c..1e28f14 100644
@@ -2759,6 +2759,8 @@ static int dce_v6_0_hw_init(void *handle)
  	int i;
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	/* disable vga render */
+	dce_v6_0_set_vga_render_state(adev, false);
  	/* init dig PHYs, disp eng pll */
  	amdgpu_atombios_encoder_init_dig(adev);
  	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0 -0
index b7079f8..e34335f 100644

drivers/gpu/drm/amd/amdgpu/dce_v8_0.c static int dce_v8_0_hw_init(void *handle) · line 2799

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +2 -0
@@ -2792,6 +2792,8 @@ static int dce_v8_0_hw_init(void *handle)
  	int i;
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	/* disable vga render */
+	dce_v8_0_set_vga_render_state(adev, false);
  	/* init dig PHYs, disp eng pll */
  	amdgpu_atombios_encoder_init_dig(adev);
  	amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx