drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
Subsystems (3)
PATCH 1/9 drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the HAS_DSB check in the _put() with a cmd_buf check that will work in either case.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dsb.c +1 -2
@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev); -if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)return ;if (WARN_ON (dsb->refcount ==0 ))
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/9 drm/i915/dsb: Disable DSB until fixed
From: Ville Syrjälä <[email protected]>
Our DSB support is borked. The DSB seems to get stuck and we just
get:
[drm:intel_dsb_commit [i915]] DSB execution started - head 0xa8c000, tail 0x10c0 [drm:intel_dsb_commit [i915]] *ERROR* Timed out waiting for DSB workload completion. [drm:icl_load_luts [i915]] DSB engine is busy.
Which even seems to result in underruns on some internal stuff. Let's just disable it all until someone figures out what's wrong with it.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dsb.c +5 -1
@@ -105,7 +105,11 @@ intel_dsb_get(struct intel_crtc *crtc)u32 *buf;intel_wakeref_t wakeref; -if (!HAS_DSB (i915)) +/* +* FIXME DSB support is busted. DSB tends to be +* busy when it shouldn't be. Disable until fixed. +*/ +if (true || !HAS_DSB (i915))return dsb;if (dsb->refcount++ !=0 )
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/9] drm/i915/dsb: Disable DSB until fixed
Quoted 10 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Our DSB support is borked. The DSB seems to get stuck and we just get:
[drm:intel_dsb_commit [i915]] DSB execution started - head0xa8c000, tail0x10c0
[drm:intel_dsb_commit [i915]] *ERROR* Timed out waiting for DSB workload completion.
[drm:icl_load_luts [i915]] DSB engine is busy.
Quoted 3 lines
Which even seems to result in underruns on some internal stuff. Let's just disable it all until someone figures out what's wrong with it.
Quoted 14 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dsb.c +0
-0@@ -105,7 +105,11 @@ intel_dsb_get(struct intel_crtc *crtc)u32 *buf;intel_wakeref_t wakeref;
drivers/gpu/drm/i915/display/intel_dsb.c intel_dsb_get(struct intel_crtc *crtc) · line 115
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dsb.c +5
-1-if (!HAS_DSB (i915)) +/* +* FIXME DSB support is busted. DSB tends to be +* busy when it shouldn't be. Disable until fixed. +*/ +if (true || !HAS_DSB (i915))return dsb;if (dsb->refcount++ !=0 )
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/9 drm/i915/dsb: Turn the "DSB is busy" into an error
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The DSB should never be busy here or we messed up somewhere else. Make this a DRM_ERROR().
--- drivers/gpu/drm/i915/display/intel_dsb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dsb.c +1 -1
@@ -52,7 +52,7 @@ static inline bool intel_dsb_enable_engine(struct intel_dsb *dsb) dsb_ctrl =intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id));if (DSB_STATUS & dsb_ctrl) { -DRM_DEBUG_KMS ("DSB engine is busy.\n" ); +DRM_ERROR ("DSB engine is busy.\n" );return false; }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/9] drm/i915/dsb: Turn the "DSB is busy" into an error
Quoted 4 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
The DSB should never be busy here or we messed up somewhere else. Make this a
DRM_ERROR().
This is required, at-least to catch the issue in CI.
Quoted 20 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dsb.c +1
-1@@ -52,7 +52,7 @@ static inline bool intel_dsb_enable_engine(struct intel_dsb *dsb) dsb_ctrl =intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id));if (DSB_STATUS & dsb_ctrl) { -DRM_DEBUG_KMS ("DSB engine is busy.\n" ); +DRM_ERROR ("DSB engine is busy.\n" );return false; }
Signature · 5 lines
~Swati Sharma _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/9 drm/i915/dsb: Stop with the RMW
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
We don't want to keep random bits set in DSB_CTRL. Stop the harmful RMW.
Also flip the reverse & around to appease my ocd.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/display/intel_dsb.c +7 -13
@@ -40,7 +40,7 @@ static inline bool is_dsb_busy(struct intel_dsb *dsb)struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe; -return DSB_STATUS &intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id)); +return intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id)) &DSB_STATUS ; }static inline bool intel_dsb_enable_engine (struct intel_dsb *dsb)
@@ -48,18 +48,15 @@ static inline bool intel_dsb_enable_engine(struct intel_dsb *dsb)struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe; -u32 dsb_ctrl; - dsb_ctrl =intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id)); -if (DSB_STATUS & dsb_ctrl) { +if (is_dsb_busy (dsb)) {DRM_ERROR ("DSB engine is busy.\n" );return false; } - dsb_ctrl |=DSB_ENABLE ; -intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id), dsb_ctrl); - +intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),DSB_ENABLE );intel_de_posting_read (dev_priv,DSB_CTRL (pipe, dsb->id)); +return true; }
@@ -68,18 +65,15 @@ static inline bool intel_dsb_disable_engine(struct intel_dsb *dsb)struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe; -u32 dsb_ctrl; - dsb_ctrl =intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id)); -if (DSB_STATUS & dsb_ctrl) { +if (is_dsb_busy (dsb)) {DRM_DEBUG_KMS ("DSB engine is busy.\n" );return false; } - dsb_ctrl &= ~DSB_ENABLE ; -intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id), dsb_ctrl); - +intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),0 );intel_de_posting_read (dev_priv,DSB_CTRL (pipe, dsb->id)); +return true; }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/9 drm/i915/dsb: Unwind on map error
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Clean up properly if we can't map the DSB buffer.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/display/intel_dsb.c +3 -0
@@ -127,6 +127,9 @@ intel_dsb_get(struct intel_crtc *crtc) buf =i915_gem_object_pin_map (vma->obj,I915_MAP_WC );if (IS_ERR (buf)) {DRM_ERROR ("Command buffer creation failed\n" ); +i915_vma_unpin (vma); +i915_vma_close (vma); +i915_gem_object_put (obj); goto out; }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/9 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
No point in having these wrappers for a simple DSB_CTRL write. Inline them into intel_dsb_commit().
--- drivers/gpu/drm/i915/display/intel_dsb.c | 64 +++++------------------- 1 file changed, 13 insertions(+), 51 deletions(-)
drivers/gpu/drm/i915/display/intel_dsb.c +13 -51
@@ -43,40 +43,6 @@ static inline bool is_dsb_busy(struct intel_dsb *dsb)return intel_de_read (dev_priv,DSB_CTRL (pipe, dsb->id)) &DSB_STATUS ; } -static inline bool intel_dsb_enable_engine (struct intel_dsb *dsb) -{ -struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -if (is_dsb_busy (dsb)) { -DRM_ERROR ("DSB engine is busy.\n" ); -return false; - } - -intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),DSB_ENABLE ); -intel_de_posting_read (dev_priv,DSB_CTRL (pipe, dsb->id)); - -return true; -} - -static inline bool intel_dsb_disable_engine (struct intel_dsb *dsb) -{ -struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -enum pipe pipe = crtc->pipe; - -if (is_dsb_busy (dsb)) { -DRM_DEBUG_KMS ("DSB engine is busy.\n" ); -return false; - } - -intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),0 ); -intel_de_posting_read (dev_priv,DSB_CTRL (pipe, dsb->id)); - -return true; -} -/** * intel_dsb_get() - Allocate DSB context and return a DSB instance. * @crtc: intel_crtc structure to get pipe info.
@@ -306,36 +272,32 @@ void intel_dsb_commit(struct intel_dsb *dsb)if (!dsb->free_pos)return ; -if (!intel_dsb_enable_engine (dsb)) - goto reset; - -if (is_dsb_busy (dsb)) { -DRM_ERROR ("HEAD_PTR write failed - dsb engine is busy.\n" ); - goto reset; - } -intel_de_write (dev_priv,DSB_HEAD (pipe, dsb->id), -i915_ggtt_offset (dsb->vma)); - tail =ALIGN (dsb->free_pos *4 ,CACHELINE_BYTES );if (tail > dsb->free_pos *4 )memset (&dsb->cmd_buf[dsb->free_pos],0 , (tail - dsb->free_pos *4 ));if (is_dsb_busy (dsb)) { -DRM_ERROR ("TAIL_PTR write failed - dsb engine is busy.\n" ); +DRM_ERROR ("DSB engine is busy.\n" ); goto reset; } -DRM_DEBUG_KMS ("DSB execution started - head 0x%x, tail 0x%x\n" , -i915_ggtt_offset (dsb->vma), tail); + +intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id), +DSB_ENABLE ); +intel_de_write (dev_priv,DSB_HEAD (pipe, dsb->id), +i915_ggtt_offset (dsb->vma));intel_de_write (dev_priv,DSB_TAIL (pipe, dsb->id),i915_ggtt_offset (dsb->vma) + tail); -if (wait_for (!is_dsb_busy (dsb),1 )) { + +DRM_DEBUG_KMS ("DSB execution started - head 0x%x, tail 0x%x\n" , +i915_ggtt_offset (dsb->vma), +i915_ggtt_offset (dsb->vma) + tail); + +if (wait_for (!is_dsb_busy (dsb),1 ))DRM_ERROR ("Timed out waiting for DSB workload completion.\n" ); - goto reset; - } reset: dsb->free_pos =0 ; dsb->ins_start_offset =0 ; -intel_dsb_disable_engine (dsb); +intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),0 ); }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/9] drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit()
Quoting Ville Syrjala (2020-01-29 18:20:31)
drivers/gpu/drm/i915/display/intel_dsb.c void intel_dsb_commit(struct intel_dsb *dsb) · line 290
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dsb.c +4
-0+intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id), +DSB_ENABLE ); +intel_de_write (dev_priv,DSB_HEAD (pipe, dsb->id), +i915_ggtt_offset (dsb->vma));intel_de_write (dev_priv,DSB_TAIL (pipe, dsb->id),i915_ggtt_offset (dsb->vma) + tail);
I still say this order looks dodgy for a ringbuffer. Is it all truly latched by DSB_TAIL or might it start passing on being enabled and HEAD != TAIL?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/9] drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit()
Quoted 11 lines · Chris Wilson
Quoting Ville Syrjala (2020-01-29 18:20:31)
drivers/gpu/drm/i915/display/intel_dsb.c void intel_dsb_commit(struct intel_dsb *dsb) · line 290
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dsb.c +4
-0+intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id), +DSB_ENABLE ); +intel_de_write (dev_priv,DSB_HEAD (pipe, dsb->id), +i915_ggtt_offset (dsb->vma));intel_de_write (dev_priv,DSB_TAIL (pipe, dsb->id),i915_ggtt_offset (dsb->vma) + tail);I still say this order looks dodgy for a ringbuffer. Is it all truly latched by
DSB_TAILor might it start passing on being enabled and HEAD != TAIL?
My initial thoughts as well, but indeed it's the tail write that makes it go (or at least that's what the docs say).
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/9 drm/i915/dsb: Wait for DSB to idle after disabling it
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
In case DSB was busy before we started it we try to disable it. Let's try to wait for it to become idle.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/display/intel_dsb.c +3 -0
@@ -300,4 +300,7 @@ void intel_dsb_commit(struct intel_dsb *dsb) dsb->free_pos =0 ; dsb->ins_start_offset =0 ;intel_de_write (dev_priv,DSB_CTRL (pipe, dsb->id),0 ); + +if (wait_for (!is_dsb_busy (dsb),1 )) +DRM_ERROR ("Timed out waiting for DSB idle.\n" ); }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/9 drm/i915/dsb: Introduce intel_dsb_align_tail()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Move the DSB tail cacheline alignment to a helper. No need to pollute the caller with mundane details like this.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dsb.c +14 -6
@@ -254,6 +254,18 @@ void intel_dsb_reg_write(struct intel_dsb *dsb, i915_reg_t reg, u32 val)i915_mmio_reg_offset (reg); } +static u32 intel_dsb_align_tail (struct intel_dsb *dsb) +{ +u32 tail; + + tail =ALIGN (dsb->free_pos *4 ,CACHELINE_BYTES ); +if (tail > dsb->free_pos *4 ) +memset (&dsb->cmd_buf[dsb->free_pos],0 , + (tail - dsb->free_pos *4 )); + +return tail; +} +/** * intel_dsb_commit() - Trigger workload execution of DSB. * @dsb: intel_dsb structure.
@@ -269,14 +281,10 @@ void intel_dsb_commit(struct intel_dsb *dsb)enum pipe pipe = crtc->pipe;u32 tail; -if (!dsb->free_pos) + tail =intel_dsb_align_tail (dsb); +if (tail ==0 )return ; - tail =ALIGN (dsb->free_pos *4 ,CACHELINE_BYTES ); -if (tail > dsb->free_pos *4 ) -memset (&dsb->cmd_buf[dsb->free_pos],0 , - (tail - dsb->free_pos *4 )); -if (is_dsb_busy (dsb)) {DRM_ERROR ("DSB engine is busy.\n" ); goto reset;
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/9 drm/i915/dsb: Nuke the 'dev' variables
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
No point in having these drm_device variables around. Get rid of them.
--- drivers/gpu/drm/i915/display/intel_dsb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_dsb.c +2 -4
@@ -57,8 +57,7 @@ static inline bool is_dsb_busy(struct intel_dsb *dsb)struct intel_dsb *intel_dsb_get (struct intel_crtc *crtc) { -struct drm_device *dev = crtc->base.dev; -struct drm_i915_private *i915 =to_i915 (dev); +struct drm_i915_private *i915 =to_i915 (crtc->base.dev);struct intel_dsb *dsb = &crtc->dsb;struct drm_i915_gem_object *obj;struct i915_vma *vma;
@@ -276,8 +275,7 @@ static u32 intel_dsb_align_tail(struct intel_dsb *dsb)void intel_dsb_commit (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_device *dev = crtc->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe;u32 tail;
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 9/9] drm/i915/dsb: Nuke the 'dev' variables
Quoted 3 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
No point in having these
drm_devicevariables around. Get rid of them.
Quoted 31 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +2
-4@@ -57,8 +57,7 @@ static inline bool is_dsb_busy(struct intel_dsb *dsb)struct intel_dsb *intel_dsb_get (struct intel_crtc *crtc) { -struct drm_device *dev = crtc->base.dev; -struct drm_i915_private *i915 =to_i915 (dev); +struct drm_i915_private *i915 =to_i915 (crtc->base.dev);struct intel_dsb *dsb = &crtc->dsb;struct drm_i915_gem_object *obj;struct i915_vma *vma;@@ -276,8 +275,7 @@ static u32 intel_dsb_align_tail(struct intel_dsb *dsb)void intel_dsb_commit (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_device *dev = crtc->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe;u32 tail;
Signature · 5 lines
~Swati Sharma _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
URL : https://patchwork.freedesktop.org/series/72737/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 9d0a47bda474 drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check dcc47ed9c2ba drm/i915/dsb: Disable DSB until fixed -:11: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #11: [drm:intel_dsb_commit [i915]] DSB execution started - head 0xa8c000, tail 0x10c0
total: 0 errors, 1 warnings, 0 checks, 12 lines checked 1ae817cd8ab9 drm/i915/dsb: Turn the "DSB is busy" into an error 47c190820a9b drm/i915/dsb: Stop with the RMWb061a1bc939f drm/i915/dsb: Unwind on map error89f3182a2632 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit() 25644f18b6f6 drm/i915/dsb: Wait for DSB to idle after disabling it 30f241242694 drm/i915/dsb: Introduce intel_dsb_align_tail() da5fb99d67d0 drm/i915/dsb: Nuke the 'dev' variables
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
URL : https://patchwork.freedesktop.org/series/72737/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7838 -> Patchwork_16319
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16319 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_16319, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_16319:
### IGT changes ###
#### Possible regressions ####
* igt@kms_chamelium@dp-edid-read:
- fi-icl-u2: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-icl-u2/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_16319 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_active:
- fi-whl-u: [PASS][3] -> [DMESG-FAIL][4] ([i915#666])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-whl-u/igt@i915_selftest@live_active.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-whl-u/igt@i915_selftest@live_active.html
#### Possible fixes ####
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [DMESG-FAIL][5] ([i915#725]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8700k: [INCOMPLETE][7] ([i915#424]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
* igt@i915_selftest@live_gtt:
- fi-bdw-5557u: [TIMEOUT][9] ([fdo#112271]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-bdw-5557u/igt@i915_selftest@live_gtt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-bdw-5557u/igt@i915_selftest@live_gtt.html
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- fi-icl-dsi: [DMESG-WARN][11] ([i915#109]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-dsi/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-icl-dsi/igt@[email protected]
#### Warnings ####
* igt@i915_selftest@live_execlists:
- fi-icl-y: [INCOMPLETE][13] ([i915#140]) -> [DMESG-FAIL][14] ([fdo#108569])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7838/fi-icl-y/igt@i915_selftest@live_execlists.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/fi-icl-y/igt@i915_selftest@live_execlists.html
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
[i915#666]: https://gitlab.freedesktop.org/drm/intel/issues/666
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
Participating hosts (50 -> 46)
------------------------------
Additional (2): fi-byt-n2820 fi-bwr-2160
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-kbl-7560u fi-tgl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7838 -> Patchwork_16319
CI-20190529: 20190529
CI_DRM_7838: d3d96beea538c8de906a1c4d7e6793a47d17a471 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5404: 4147bab8e3dcaf11bd657b5fb4c109708e94e60c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16319: da5fb99d67d021173d498e119d0f2c8ca5c8c6e3 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
da5fb99d67d0 drm/i915/dsb: Nuke the 'dev' variables 30f241242694 drm/i915/dsb: Introduce intel_dsb_align_tail() 25644f18b6f6 drm/i915/dsb: Wait for DSB to idle after disabling it 89f3182a2632 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit() b061a1bc939f drm/i915/dsb: Unwind on map error47c190820a9b drm/i915/dsb: Stop with the RMW1ae817cd8ab9 drm/i915/dsb: Turn the "DSB is busy" into an error dcc47ed9c2ba drm/i915/dsb: Disable DSB until fixed 9d0a47bda474 drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16319/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check (rev2)
URL : https://patchwork.freedesktop.org/series/72737/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 770bb0a72167 drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check 2bb3151e5050 drm/i915/dsb: Disable DSB until fixed -:11: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #11: [drm:intel_dsb_commit [i915]] DSB execution started - head 0xa8c000, tail 0x10c0
total: 0 errors, 1 warnings, 0 checks, 12 lines checked cbb3cfcc3bae drm/i915/dsb: Turn the "DSB is busy" into an error 46a21d424063 drm/i915/dsb: Stop with the RMW84a01d2ee8dc drm/i915/dsb: Unwind on map error53fed04914b3 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit() 28b429e1447d drm/i915/dsb: Wait for DSB to idle after disabling it 46032e921202 drm/i915/dsb: Introduce intel_dsb_align_tail() 1406264377b6 drm/i915/dsb: Nuke the 'dev' variables
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [1/9] drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check (rev2)
URL : https://patchwork.freedesktop.org/series/72737/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7844 -> Patchwork_16336
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16336 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_16336, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_16336:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_hangcheck:
- fi-icl-u3: [PASS][1] -> [TIMEOUT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
Known issues
------------
Here are the changes found in Patchwork_16336 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_blt:
- fi-hsw-4770: [PASS][3] -> [DMESG-FAIL][4] ([i915#553] / [i915#725])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-hsw-4770/igt@i915_selftest@live_blt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-hsw-4770/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_execlists:
- fi-kbl-8809g: [PASS][5] -> [INCOMPLETE][6] ([fdo#112175] / [fdo#112259] / [i915#435])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-kbl-8809g/igt@i915_selftest@live_execlists.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-kbl-8809g/igt@i915_selftest@live_execlists.html
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][7] ([i915#178]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-skl-6770hq/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-skl-6770hq/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][9] ([fdo#111096] / [i915#323]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-kbl-7500u/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][11] ([i915#44]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7844/fi-hsw-peppy/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/fi-hsw-peppy/igt@[email protected]
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#112175]: https://bugs.freedesktop.org/show_bug.cgi?id=112175
[fdo#112259]: https://bugs.freedesktop.org/show_bug.cgi?id=112259
[i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
Participating hosts (46 -> 42)
------------------------------
Additional (7): fi-glk-dsi fi-ilk-650 fi-whl-u fi-ivb-3770 fi-cfl-8109u fi-blb-e6850 fi-kbl-r
Missing (11): fi-icl-1065g7 fi-cml-u2 fi-ilk-m540 fi-hsw-4200u fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-gdg-551 fi-elk-e7500 fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7844 -> Patchwork_16336
CI-20190529: 20190529
CI_DRM_7844: 47faa2a989ef89a15089190a5f942a2d2a34fda5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5407: a9d69f51dadbcbc53527671f87572d05c3370cba @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16336: 1406264377b6e5e02a9949673ef4c6b2248f6bd8 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
1406264377b6 drm/i915/dsb: Nuke the 'dev' variables 46032e921202 drm/i915/dsb: Introduce intel_dsb_align_tail() 28b429e1447d drm/i915/dsb: Wait for DSB to idle after disabling it 53fed04914b3 drm/i915/dsb: Inline DSB_CTRL writes into intel_dsb_commit() 84a01d2ee8dc drm/i915/dsb: Unwind on map error46a21d424063 drm/i915/dsb: Stop with the RMWcbb3cfcc3bae drm/i915/dsb: Turn the "DSB is busy" into an error 2bb3151e5050 drm/i915/dsb: Disable DSB until fixed 770bb0a72167 drm/i915/dsb: Replace HAS_DSB check with dsb->cmd_buf check
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16336/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.
Quoted 22 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +1
-2@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev); -if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)return ;
Quoted 1 line
if (
WARN_ON(dsb->refcount == 0))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · Jose
Quoted 5 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.Reviewed-by José Roberto de Souza <[email protected]>Quoted 17 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +0
-1@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev);
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c intel_dsb_get(struct intel_crtc *crtc) · line 164
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c +1
-1-if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)
Ville and Jose,
Have a concern here. In intel_dsb_get() if get failure during i915_gem_object_create_internal, i915_gem_object_ggtt_pin, i915_gem_object_pin_map then we may not have dsb->cmd_buf. Then ref-count mechanism will break.
I feel HAS_DSB(i915) check is better than dsb->cmd_buf otherwise need to do some cleanup is intel_dsb_get() as well.
Regards,
Animesh
Quoted 7 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_dsb.c +0
-0return ;if (
WARN_ON(dsb->refcount == 0))_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 27 lines · Animesh
Quoted 25 lines · Jose
Quoted 5 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.Reviewed-by José Roberto de Souza <[email protected]>Quoted 17 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +0
-1@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev);
Quoted 7 lines
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c intel_dsb_get(struct intel_crtc *crtc) · line 164
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c +1
-1-if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)Ville and Jose,
Have a concern here. In
intel_dsb_get()if get failure duringi915_gem_object_create_internal,i915_gem_object_ggtt_pin,i915_gem_object_pin_mapthen we may not havedsb->cmd_buf. Then ref-count mechanism will break.
Hmm. Yeah. The refcount WARN could easily be fixed by either decrementung refcount on get() fail or doing the "let's never use DSB" patch after the refcount inc.
Quoted 12 lines
I feel
HAS_DSB(i915)check is better thandsb->cmd_bufotherwise need to do some cleanup isintel_dsb_get()as well.Regards,
AnimeshQuoted 7 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_dsb.c +0
-0return ;if (
WARN_ON(dsb->refcount == 0))_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 31 lines · Ville Syrjälä
Quoted 30 lines · Animesh
Quoted 25 lines · Jose
Quoted 5 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.Reviewed-by José Roberto de Souza <[email protected]>Quoted 17 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +0
-1@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev);Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c intel_dsb_get(struct intel_crtc *crtc) · line 164
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c +1
-1-if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)Ville and Jose,
Quoted 5 lines
Quoted 2 lines
Have a concern here. In
intel_dsb_get()if get failure duringi915_gem_object_create_internal,i915_gem_object_ggtt_pin,i915_gem_object_pin_mapthen we may not havedsb->cmd_buf. Then ref-count mechanism will break.Hmm. Yeah. The refcount WARN could easily be fixed by either decrementung refcount on
get()fail or doing the "let's never use DSB" patch after the refcount inc.
Hmm, from design point get/put/ref-count mechanism introduced to check dsp-api are used properly or not. For erroneous case managing ref-count in get() itself void the purpose of put() call. For example,
intel_dsb_get()
got error from i915_gem_object_create_internal, i915_gem_object_ggtt_pin, i915_gem_object_pin_map intel_dsb_putintel_dsb_put
...
Should throw warning but can not if we manage in get() itself.
Regards,
Animesh
Quoted 6 lines
Quoted 6 lines
I feel
HAS_DSB(i915)check is better thandsb->cmd_bufotherwise need to do some cleanup isintel_dsb_get()as well.Regards,
Animesh
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_dsb.c +0
-0return ;if (WARN_ON(dsb->refcount == 0))_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Animesh
Quoted 31 lines · Ville Syrjälä
Quoted 30 lines · Animesh
Quoted 25 lines · Jose
Quoted 5 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.Reviewed-by José Roberto de Souza <[email protected]>Quoted 17 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +0
-1@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev);Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c intel_dsb_get(struct intel_crtc *crtc) · line 164
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dsb.c +1
-1-if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)Ville and Jose,
Quoted 5 lines
Quoted 2 lines
Have a concern here. In
intel_dsb_get()if get failure duringi915_gem_object_create_internal,i915_gem_object_ggtt_pin,i915_gem_object_pin_mapthen we may not havedsb->cmd_buf. Then ref-count mechanism will break.Hmm. Yeah. The refcount WARN could easily be fixed by either decrementung refcount on
get()fail or doing the "let's never use DSB" patch after the refcount inc.Hmm, from design point get/put/ref-count mechanism introduced to check dsp-api are used properly or not. For erroneous case managing ref-count in
get()itself void the purpose ofput()call. For example,
Quoted 7 lines
intel_dsb_get()
got error fromi915_gem_object_create_internal,i915_gem_object_ggtt_pin,i915_gem_object_pin_mapintel_dsb_putintel_dsb_put
...Should throw warning but can not if we manage in
get()itself.
None of this stuff should really exist in the guts of the dsb code anyway. It's all just a hack to get the dsb code in without actually taking advantage of the dsb. The real solution would involve doing the dsb vs. mmio decision upfront at the start of the atomic commit, and then using totally different codeepaths for those two cases. No real need for refcounts in that case. But first we'd need to finish the vblank workers so we'd have the mmio path sorted out.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Ville,
Can you please rebase on current drm-tip and submit new revision so that new run can be executed? BAT failure was observed with the last revision submitted.
Quoted 27 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
We may want to not use the DSB even if the platform has one. So replace the
HAS_DSBcheck in the_put()with acmd_bufcheck that will work in either case.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dsb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dsb.c +1
-2@@ -160,9 +160,8 @@ intel_dsb_get(struct intel_crtc *crtc)void intel_dsb_put (struct intel_dsb *dsb) {struct intel_crtc *crtc =container_of (dsb,typeof (*crtc), dsb); -struct drm_i915_private *i915 =to_i915 (crtc->base.dev); -if (!HAS_DSB (i915)) +if (!dsb->cmd_buf)return ;if (WARN_ON (dsb->refcount ==0 ))
Signature · 5 lines
~Swati Sharma _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx