Skip to contentSkip to conversation

drm/amdgpu/dce: fix mask in dce_v*_0_is_in_vblank

PATCH In review Alex Deucher 2 participants 3 messages Feb 2, 2018 1 message not in the archive

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

PATCH 1/2 drm/amdgpu/dce: fix mask in dce_v*_0_is_in_vblank

Using the wrong mask.

---
 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_v8_0.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index c7d1ef00f9a4..8161b6579715 100644
@@ -193,7 +193,7 @@ static void dce_v10_0_audio_endpt_wreg(struct amdgpu_device *adev,
 static bool dce_v10_0_is_in_vblank(struct amdgpu_device *adev, int crtc)
 {
 	if (RREG32(mmCRTC_STATUS + crtc_offsets[crtc]) &
-			CRTC_V_BLANK_START_END__CRTC_V_BLANK_START_MASK)
+	    CRTC_STATUS__CRTC_V_BLANK_MASK)
 		return true;
 	else
 		return false;
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index 99bc1f36c96b..00b3df281207 100644
@@ -210,7 +210,7 @@ static void dce_v11_0_audio_endpt_wreg(struct amdgpu_device *adev,
 static bool dce_v11_0_is_in_vblank(struct amdgpu_device *adev, int crtc)
 {
 	if (RREG32(mmCRTC_STATUS + crtc_offsets[crtc]) &
-			CRTC_V_BLANK_START_END__CRTC_V_BLANK_START_MASK)
+	    CRTC_STATUS__CRTC_V_BLANK_MASK)
 		return true;
 	else
 		return false;
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index 823a8c331da5..6fc3e05aadbc 100644
@@ -143,7 +143,7 @@ static void dce_v8_0_audio_endpt_wreg(struct amdgpu_device *adev,
 static bool dce_v8_0_is_in_vblank(struct amdgpu_device *adev, int crtc)
 {
 	if (RREG32(mmCRTC_STATUS + crtc_offsets[crtc]) &
-			CRTC_V_BLANK_START_END__CRTC_V_BLANK_START_MASK)
+	    CRTC_STATUS__CRTC_V_BLANK_MASK)
 		return true;
 	else
 		return false;
Signature · 6 lines
2.13.6

_______________________________________________
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): 20180202173357.7833-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu: remove unused display_vblank_wait interface

No longer used since we changed the MC programming sequence.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h               |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h          |  2 -
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c            | 61 -----------------------
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c            | 61 -----------------------
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c             | 59 ----------------------
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c             | 61 -----------------------
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c          | 14 ------
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  1 -
 8 files changed, 260 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -1
index 02b1c954e31b..ebe4595c8897 100644
@@ -1803,7 +1803,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
 #define amdgpu_ih_decode_iv(adev, iv) (adev)->irq.ih_funcs->decode_iv((adev), (iv))
 #define amdgpu_ih_set_rptr(adev) (adev)->irq.ih_funcs->set_rptr((adev))
 #define amdgpu_display_vblank_get_counter(adev, crtc) (adev)->mode_info.funcs->vblank_get_counter((adev), (crtc))
-#define amdgpu_display_vblank_wait(adev, crtc) (adev)->mode_info.funcs->vblank_wait((adev), (crtc))
 #define amdgpu_display_backlight_set_level(adev, e, l) (adev)->mode_info.funcs->backlight_set_level((e), (l))
 #define amdgpu_display_backlight_get_level(adev, e) (adev)->mode_info.funcs->backlight_get_level((e))
 #define amdgpu_display_hpd_sense(adev, h) (adev)->mode_info.funcs->hpd_sense((adev), (h))
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +0 -2
index ea1bd75bef35..d9533bbc467c 100644
@@ -267,8 +267,6 @@ struct amdgpu_display_funcs {
 	void (*bandwidth_update)(struct amdgpu_device *adev);
 	/* get frame count */
 	u32 (*vblank_get_counter)(struct amdgpu_device *adev, int crtc);
-	/* wait for vblank */
-	void (*vblank_wait)(struct amdgpu_device *adev, int crtc);
 	/* set backlight level */
 	void (*backlight_set_level)(struct amdgpu_encoder *amdgpu_encoder,
 				    u8 level);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0 -61

73 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +0 -61

73 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0 -59

71 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0 -61

73 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0 -14
index 3d6cb0cc2b1d..8201a0929ca2 100644
@@ -48,19 +48,6 @@ static void dce_virtual_set_crtc_vblank_interrupt_state(struct amdgpu_device *ad
 							int crtc,
 							enum amdgpu_interrupt_state state);
 
-/**
- * dce_virtual_vblank_wait - vblank wait asic callback.
- *
- * @adev: amdgpu_device pointer
- * @crtc: crtc to wait for vblank on
- *
- * Wait for vblank on the requested crtc (evergreen+).
- */
-static void dce_virtual_vblank_wait(struct amdgpu_device *adev, int crtc)
-{
-	return;
-}
-
 static u32 dce_virtual_vblank_get_counter(struct amdgpu_device *adev, int crtc)
 {
 	return 0;
@@ -654,7 +641,6 @@ static int dce_virtual_connector_encoder_init(struct amdgpu_device *adev,
 static const struct amdgpu_display_funcs dce_virtual_display_funcs = {
 	.bandwidth_update = &dce_virtual_bandwidth_update,
 	.vblank_get_counter = &dce_virtual_vblank_get_counter,
-	.vblank_wait = &dce_virtual_vblank_wait,
 	.backlight_set_level = NULL,
 	.backlight_get_level = NULL,
 	.hpd_sense = &dce_virtual_hpd_sense,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index ad49c335c8d9..5928d9f0e4ef 100644
@@ -1568,7 +1568,6 @@ static int amdgpu_notify_freesync(struct drm_device *dev, void *data,
 static const struct amdgpu_display_funcs dm_display_funcs = {
 	.bandwidth_update = dm_bandwidth_update, /* called unconditionally */
 	.vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */
-	.vblank_wait = NULL,
 	.backlight_set_level =
 		dm_set_backlight_level,/* called unconditionally */
 	.backlight_get_level =
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Alex Deucher

Using the wrong mask.

The series is

Thanks for taking care of this!

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx