drm/i915: Display WA #0827 for NV12 to RGB switch
Subsystems (4)
PATCH 1/1 drm/i915: Display WA #0827 for NV12 to RGB switch
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in the CLKGATE_DIS_PSL register for the pipe in which NV12 plane is enabled.
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -3822,6 +3822,9 @@ enum {#define _CLKGATE_DIS_PSL_A 0x46520#define _CLKGATE_DIS_PSL_B 0x46524#define _CLKGATE_DIS_PSL_C 0x46528 +#define DUPS1_GATING_DIS (1 << 15) +#define DUPS2_GATING_DIS (1 << 19) +#define DUPS3_GATING_DIS (1 << 23)#define DPF_GATING_DIS (1 << 10)#define DPF_RAM_GATING_DIS (1 << 9)#define DPFR_GATING_DIS (1 << 8)
drivers/gpu/drm/i915/intel_display.c +16 -0
@@ -5495,6 +5495,20 @@ static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,I915_WRITE (CLKGATE_DIS_PSL (pipe), val); } +static void skl_wa_clkgate (struct drm_i915_private *dev_priv, +int pipe,int enable) +{ +if (pipe ==PIPE_A || pipe ==PIPE_B ) { +if (enable) +I915_WRITE (CLKGATE_DIS_PSL (pipe), +DUPS1_GATING_DIS |DUPS2_GATING_DIS ); +else +I915_WRITE (CLKGATE_DIS_PSL (pipe), +I915_READ (CLKGATE_DIS_PSL (pipe)) & + ~(DUPS1_GATING_DIS |DUPS2_GATING_DIS )); + } +} +static void haswell_crtc_enable (struct intel_crtc_state *pipe_config,struct drm_atomic_state *old_state) {
@@ -5599,6 +5613,7 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,intel_wait_for_vblank (dev_priv, hsw_workaround_pipe);intel_wait_for_vblank (dev_priv, hsw_workaround_pipe); } +skl_wa_clkgate (dev_priv, pipe,1 ); }static void ironlake_pfit_disable (struct intel_crtc *crtc,bool force)
@@ -5709,6 +5724,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,intel_ddi_disable_pipe_clock (intel_crtc->config);intel_encoders_post_disable (crtc, old_crtc_state, old_state); +skl_wa_clkgate (dev_priv, intel_crtc->pipe,0 ); }static void i9xx_pfit_enable (struct intel_crtc *crtc)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Enable YUV to RGB for Gen10 in Plane Ctrl Reg
If the fb format is YUV, enable the plane CSC mode bits for the conversion.
--- drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_display.c | 2 ++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -6384,6 +6384,12 @@ enum {#define _PLANE_COLOR_CTL_3_A 0x703CC/* GLK+ */ #define PLANE_COLOR_PIPE_GAMMA_ENABLE (1 << 30)#define PLANE_COLOR_PIPE_CSC_ENABLE (1 << 23) +#define PLANE_COLOR_CSC_MASK (0x7 << 17) +#define PLANE_COLOR_CSC_MODE_BYPASS (0 << 17) +#define PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709 (1 << 17) +#define PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709 (2 << 17) +#define PLANE_COLOR_CSC_MODE_YUV2020_TO_RGB2020 (3 << 17) +#define PLANE_COLOR_CSC_MODE_RGB709_TO_RGB2020 (4 << 17)#define PLANE_COLOR_PLANE_GAMMA_DISABLE (1 << 13)#define PLANE_COLOR_ALPHA_MASK (0x3 << 4)#define PLANE_COLOR_ALPHA_DISABLE (0 << 4)
drivers/gpu/drm/i915/intel_display.c +2 -0
@@ -3539,6 +3539,8 @@ u32 glk_plane_color_ctl(const struct intel_crtc_state *crtc_state, plane_color_ctl |=PLANE_COLOR_PIPE_CSC_ENABLE ; plane_color_ctl |=PLANE_COLOR_PLANE_GAMMA_DISABLE ; plane_color_ctl |=glk_plane_color_ctl_alpha (fb->format->format); +if (intel_format_is_yuv (fb->format->format)) + plane_color_ctl |=PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709 ;return plane_color_ctl; }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: NV12 changes for Gen10
In reply to Vidya Srinivas--- drivers/gpu/drm/i915/intel_atomic.c | 5 ++--- drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_atomic.c +2 -3
@@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, }/* set scaler mode */ -if ((IS_BROXTON (dev_priv) ||IS_KABYLAKE (dev_priv)) && +if ((IS_BROXTON (dev_priv) ||IS_KABYLAKE (dev_priv) || +IS_GEMINILAKE (dev_priv) ||IS_CANNONLAKE (dev_priv)) && plane_state && plane_state->base.fb && plane_state->base.fb->format->format ==DRM_FORMAT_NV12 ) { scaler_state->scalers[*scaler_id].mode =PS_SCALER_MODE_NV12 ; - }else if (IS_GEMINILAKE (dev_priv) ||IS_CANNONLAKE (dev_priv)) { - scaler_state->scalers[*scaler_id].mode =0 ; }else if (num_scalers_need ==1 && intel_crtc->pipe !=PIPE_C ) {/* * when only 1 scaler is in use on either pipe A or B,
drivers/gpu/drm/i915/intel_display.c +6 -1
@@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ((pipe == PIPE_A || pipe == PIPE_B))) { intel_primary_formats = nv12_primary_formats; num_formats =ARRAY_SIZE (nv12_primary_formats); + } else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { + intel_primary_formats = nv12_primary_formats; + num_formats =ARRAY_SIZE (nv12_primary_formats); } else { + intel_primary_formats = skl_primary_formats; num_formats =ARRAY_SIZE (skl_primary_formats); }
@@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, }break ;case DRM_FORMAT_NV12 : -if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv)) { +if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv) && + !IS_GEMINILAKE (dev_priv) && !IS_CANNONLAKE (dev_priv)) {DRM_DEBUG_KMS ("unsupported pixel format: %s\n" ,drm_get_format_name (mode_cmd->pixel_format, &format_name));
drivers/gpu/drm/i915/intel_sprite.c +4 -0
@@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv, (pipe == PIPE_A || pipe == PIPE_B) && plane == 0) { plane_formats = nv12_plane_formats; num_plane_formats =ARRAY_SIZE (nv12_plane_formats); + } else if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && + plane == 0) { + plane_formats = nv12_plane_formats; + num_plane_formats =ARRAY_SIZE (nv12_plane_formats); } else { plane_formats = skl_plane_formats; num_plane_formats =ARRAY_SIZE (skl_plane_formats);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: NV12 changes for Gen10
Regards
Shashank
Quoted 1 line · Vidya Srinivas
Signed-off-by Vidya Srinivas <[email protected]>
No need for any commit message :P ?
Quoted 11 lines
--- drivers/gpu/drm/i915/intel_atomic.c | 5 ++--- drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_atomic.c +0
-0
drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, · line 331
Quoted 6 lines
drivers/gpu/drm/i915/intel_atomic.c +2
-1@@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, }/* set scaler mode */ - if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv)) && + if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv) || + IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
Please align the conditions to above line, below existing IS_BXT
Quoted 15 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-2plane_state && plane_state->base.fb && plane_state->base.fb->format->format == DRM_FORMAT_NV12) { scaler_state->scalers[*scaler_id].mode =PS_SCALER_MODE_NV12 ; - } else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { - scaler_state->scalers[*scaler_id].mode =0 ; } else if (num_scalers_need == 1 && intel_crtc->pipe != PIPE_C) {/* * when only 1 scaler is in use on either pipe A or B, drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) · line 13205
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +3
-0@@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ((pipe == PIPE_A || pipe == PIPE_B))) { intel_primary_formats = nv12_primary_formats; num_formats =ARRAY_SIZE (nv12_primary_formats); + } else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { + intel_primary_formats = nv12_primary_formats; + num_formats =ARRAY_SIZE (nv12_primary_formats);
I can see these same lines in the above condition, can we simply add this (|| IS_GLK || IS_CNL) condition in above ? Or not ?
drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) · line 13207
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1
-0}else { +
Extra line
drivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, · line 14014
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +2
-1intel_primary_formats = skl_primary_formats; num_formats =ARRAY_SIZE (skl_primary_formats); }@@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, }break ;case DRM_FORMAT_NV12 : -if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv)) { +if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv) && + !IS_GEMINILAKE (dev_priv) && !IS_CANNONLAKE (dev_priv)) {
Alignment
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0
-0DRM_DEBUG_KMS ("unsupported pixel format: %s\n" ,drm_get_format_name (mode_cmd->pixel_format, &format_name));drivers/gpu/drm/i915/intel_sprite.c +0
-0
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv, · line 1346
Quoted 7 lines
drivers/gpu/drm/i915/intel_sprite.c +4
-0@@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv, (pipe == PIPE_A || pipe == PIPE_B) && plane == 0) { plane_formats = nv12_plane_formats; num_plane_formats =ARRAY_SIZE (nv12_plane_formats); + } else if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && + plane == 0) { + plane_formats = nv12_plane_formats; + num_plane_formats =ARRAY_SIZE (nv12_plane_formats);
Same as above, can this merge into condition just above this if ?
- Shashank
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv, · line 1349
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +0
-0}else { plane_formats = skl_plane_formats; num_plane_formats =ARRAY_SIZE (skl_plane_formats);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: NV12 changes for Gen10
Apologies. This patch was pushed wrongly. Not a part of the 16 patch series of NV12.
Regards
Vidya
Quoted 108 lines
-----Original Message-----
From: Sharma, Shashank
Sent: Thursday, February 8, 2018 6:17 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Cc: [email protected]; Kamath, Sunil <[email protected]>; Shankar, Uma <[email protected]>
Subject: Re: [PATCH] drm/i915: NV12 changes for Gen10Regards
Shashank
Quoted 1 line · Vidya Srinivas
Signed-off-by Vidya Srinivas <[email protected]>No need for any commit message :P ?
drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct
Quoted 12 lines
--- drivers/gpu/drm/i915/intel_atomic.c | 5 ++--- drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_atomic.c +0
-0@@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/intel_atomic.c +2
-1}/* set scaler mode */ - if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv)) && + if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv) || + IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) &&
Please align the conditions to above line, below existingIS_BXTdrivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-1plane_state && plane_state->base.fb && plane_state->base.fb->format->format == DRM_FORMAT_NV12) { scaler_state->scalers[*scaler_id].mode =PS_SCALER_MODE_NV12 ; - } else if (IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) {drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct · line 337
Quoted 2 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-1- scaler_state->scalers[*scaler_id].mode =0 ; } else if (num_scalers_need == 1 && intel_crtc->pipe !=
PIPE_C) {drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, · line 339
Quoted 2 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-0/* * when only 1 scaler is in use on either pipe A or B, diff --git
drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct
Quoted 6 lines
a/drivers/gpu/drm/i915/intel_display.cb/drivers/gpu/drm/i915/intel_display.c
index df6b11a..115e0ea 100644drivers/gpu/drm/i915/intel_display.c +0
-0@@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct
drm_i915_private*dev_priv, enum pipe pipe)drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +0
-0((pipe == PIPE_A || pipe == PIPE_B))) { intel_primary_formats = nv12_primary_formats; num_formats =
ARRAY_SIZE(nv12_primary_formats);drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct · line 13203
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1
-0+ } else if (IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) {drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct · line 13205
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+ intel_primary_formats = nv12_primary_formats; + num_formats =
ARRAY_SIZE(nv12_primary_formats);
I can see these same lines in the above condition, can we simply add this (||IS_GLK||IS_CNL) condition in above ? Or not ?drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) · line 13207
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1
-0}else { +Extra line
drivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +0
-0intel_primary_formats = skl_primary_formats; num_formats =ARRAY_SIZE (skl_primary_formats); }@@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct
intel_framebuffer*intel_fb,drivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +2
-1}break ;case DRM_FORMAT_NV12 : -if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv)) { + if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv) && + !IS_GEMINILAKE(dev_priv) &&!IS_CANNONLAKE(dev_priv)) {
Alignmentdrivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct · line 14015
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +0
-0DRM_DEBUG_KMS("unsupported pixel format:%s\n",
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0
-0drm_get_format_name (mode_cmd->pixel_format, &format_name));drivers/gpu/drm/i915/intel_sprite.c +0
-0@@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +0
-0(pipe == PIPE_A || pipe == PIPE_B) && plane == 0) { plane_formats = nv12_plane_formats; num_plane_formats =
ARRAY_SIZE(nv12_plane_formats);drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct · line 1343
Quoted 1 line
drivers/gpu/drm/i915/intel_sprite.c +1
-0+ } else if ((IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) &&drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +3
-0+ plane == 0) { + plane_formats = nv12_plane_formats; + num_plane_formats =
ARRAY_SIZE(nv12_plane_formats);
Same as above, can this merge into condition just above this if ?
Quoted 5 lines
- Shashank
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +0
-0}else { plane_formats = skl_plane_formats; num_plane_formats =
ARRAY_SIZE(skl_plane_formats);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: NV12 changes for Gen10
In reply to Sharma, ShashankApologies. This patch was pushed wrongly. Not a part of the 16 patch series of NV12.
Regards
Vidya
Quoted 108 lines
-----Original Message-----
From: Sharma, Shashank
Sent: Thursday, February 8, 2018 6:17 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Cc: [email protected]; Kamath, Sunil <[email protected]>; Shankar, Uma <[email protected]>
Subject: Re: [PATCH] drm/i915: NV12 changes for Gen10Regards
Shashank
Quoted 1 line · Vidya Srinivas
Signed-off-by Vidya Srinivas <[email protected]>No need for any commit message :P ?
drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct
Quoted 12 lines
--- drivers/gpu/drm/i915/intel_atomic.c | 5 ++--- drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_atomic.c +0
-0@@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/intel_atomic.c +2
-1}/* set scaler mode */ - if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv)) && + if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv) || + IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) &&
Please align the conditions to above line, below existingIS_BXTdrivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
Quoted 6 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-1plane_state && plane_state->base.fb && plane_state->base.fb->format->format == DRM_FORMAT_NV12) { scaler_state->scalers[*scaler_id].mode =PS_SCALER_MODE_NV12 ; - } else if (IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) {drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct · line 337
Quoted 2 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-1- scaler_state->scalers[*scaler_id].mode =0 ; } else if (num_scalers_need == 1 && intel_crtc->pipe !=
PIPE_C) {drivers/gpu/drm/i915/intel_atomic.c int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, · line 339
Quoted 2 lines
drivers/gpu/drm/i915/intel_atomic.c +0
-0/* * when only 1 scaler is in use on either pipe A or B, diff --git
drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct
Quoted 6 lines
a/drivers/gpu/drm/i915/intel_display.cb/drivers/gpu/drm/i915/intel_display.c
index df6b11a..115e0ea 100644drivers/gpu/drm/i915/intel_display.c +0
-0@@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct
drm_i915_private*dev_priv, enum pipe pipe)drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +0
-0((pipe == PIPE_A || pipe == PIPE_B))) { intel_primary_formats = nv12_primary_formats; num_formats =
ARRAY_SIZE(nv12_primary_formats);drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct · line 13203
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +1
-0+ } else if (IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) {drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct · line 13205
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+ intel_primary_formats = nv12_primary_formats; + num_formats =
ARRAY_SIZE(nv12_primary_formats);
I can see these same lines in the above condition, can we simply add this (||IS_GLK||IS_CNL) condition in above ? Or not ?drivers/gpu/drm/i915/intel_display.c intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) · line 13207
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +1
-0}else { +Extra line
drivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +0
-0intel_primary_formats = skl_primary_formats; num_formats =ARRAY_SIZE (skl_primary_formats); }@@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct
intel_framebuffer*intel_fb,drivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +2
-1}break ;case DRM_FORMAT_NV12 : -if (!IS_BROXTON (dev_priv) && !IS_KABYLAKE (dev_priv)) { + if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv) && + !IS_GEMINILAKE(dev_priv) &&!IS_CANNONLAKE(dev_priv)) {
Alignmentdrivers/gpu/drm/i915/intel_display.c static int intel_framebuffer_init(struct · line 14015
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +0
-0DRM_DEBUG_KMS("unsupported pixel format:%s\n",
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0
-0drm_get_format_name (mode_cmd->pixel_format, &format_name));drivers/gpu/drm/i915/intel_sprite.c +0
-0@@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +0
-0(pipe == PIPE_A || pipe == PIPE_B) && plane == 0) { plane_formats = nv12_plane_formats; num_plane_formats =
ARRAY_SIZE(nv12_plane_formats);drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct · line 1343
Quoted 1 line
drivers/gpu/drm/i915/intel_sprite.c +1
-0+ } else if ((IS_GEMINILAKE(dev_priv) ||
IS_CANNONLAKE(dev_priv)) &&drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +3
-0+ plane == 0) { + plane_formats = nv12_plane_formats; + num_plane_formats =
ARRAY_SIZE(nv12_plane_formats);
Same as above, can this merge into condition just above this if ?
Quoted 5 lines
- Shashank
drivers/gpu/drm/i915/intel_sprite.c intel_sprite_plane_create(struct drm_i915_private *dev_priv,
Quoted 3 lines
drivers/gpu/drm/i915/intel_sprite.c +0
-0}else { plane_formats = skl_plane_formats; num_plane_formats =
ARRAY_SIZE(skl_plane_formats);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 YUV444 10/12/16 bit declarations and additions
In reply to Vidya Srinivas--- drivers/gpu/drm/drm_fourcc.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 42 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_sprite.c | 7 +++++- include/uapi/drm/drm_fourcc.h | 5 +++++ 5 files changed, 58 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_fourcc.c +3 -0
@@ -173,6 +173,9 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_Y410, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_Y412, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_Y416, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, }; unsigned int i;
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -6400,6 +6400,9 @@ enum {#define _PLANE_NV12_BUF_CFG_1_A 0x70278#define _PLANE_NV12_BUF_CFG_2_A 0x70378 +#define PLANE_CTL_FORMAT_Y410 (7 << 24) +#define PLANE_CTL_FORMAT_Y412 (9 << 24) +#define PLANE_CTL_FORMAT_Y416 (0xB << 24)#define _PLANE_CTL_1_B 0x71180#define _PLANE_CTL_2_B 0x71280
drivers/gpu/drm/i915/intel_display.c +41 -1
84 lines not on this page · raw message
drivers/gpu/drm/i915/intel_sprite.c +6 -1
@@ -1162,6 +1162,9 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_UYVY ,DRM_FORMAT_VYUY ,DRM_FORMAT_NV12 , +DRM_FORMAT_Y410 , +DRM_FORMAT_Y412 , + DRM_FORMAT_Y416, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {
@@ -1362,7 +1365,9 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,if (INTEL_GEN (dev_priv) <=10 && ((plane !=0 ) || (pipe ==PIPE_C ))) - num_plane_formats -=1 ; + num_plane_formats -=4 ; +else if (INTEL_GEN (dev_priv) <=10 ) + num_plane_formats -=3 ;if (skl_plane_has_ccs (dev_priv, pipe,PLANE_SPRITE0 + plane)) modifiers = skl_plane_format_modifiers_ccs;
include/uapi/drm/drm_fourcc.h +5 -0
@@ -113,6 +113,11 @@ extern "C" {#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V')/* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0')/* [31:0] A:V:Y:U 2:10:10:10 little endian */ +#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2')/* [64:0] A:V:Y:U 12:12:12:12 little endian */ +#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6')/* [64:0] A:V:Y:U 16:16:16:16 little endian */ + +/* * 2 plane RGB + A * index 0 = RGB plane, same format as the corresponding non _A8 format has
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 yuv422 - rough patch for 10/12/16 bit packed support
In reply to Vidya Srinivas--- drivers/gpu/drm/drm_fourcc.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 24 +++++++++++++++++++++--- drivers/gpu/drm/i915/intel_sprite.c | 12 +++++++++--- include/uapi/drm/drm_fourcc.h | 3 +++ 5 files changed, 39 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_fourcc.c +3 -0
@@ -176,6 +176,9 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_Y410, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_Y412, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, { .format = DRM_FORMAT_Y416, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_V210, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_V212, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 2, .vsub = 1 }, + { .format = DRM_FORMAT_V216, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 2, .vsub = 1 }, }; unsigned int i;
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -6403,6 +6403,9 @@ enum {#define PLANE_CTL_FORMAT_Y410 (7 << 24)#define PLANE_CTL_FORMAT_Y412 (9 << 24)#define PLANE_CTL_FORMAT_Y416 (0xB << 24) +#define PLANE_CTL_FORMAT_V210 (1 << 24) +#define PLANE_CTL_FORMAT_V212 (3 << 24) +#define PLANE_CTL_FORMAT_V216 (5 << 24)#define _PLANE_CTL_1_B 0x71180#define _PLANE_CTL_2_B 0x71280
drivers/gpu/drm/i915/intel_display.c +21 -3
@@ -90,6 +90,9 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_Y410 ,DRM_FORMAT_Y412 ,DRM_FORMAT_Y416 , +DRM_FORMAT_V210 , +DRM_FORMAT_V212 , + DRM_FORMAT_V216, }; static const uint64_t skl_format_modifiers_noccs[] = {
@@ -3424,6 +3427,12 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)return PLANE_CTL_FORMAT_Y412 ;case DRM_FORMAT_Y416 :return PLANE_CTL_FORMAT_Y416 ; +case DRM_FORMAT_V210 : +return PLANE_CTL_FORMAT_V210 |PLANE_CTL_YUV422_YUYV ; +case DRM_FORMAT_V212 : +return PLANE_CTL_FORMAT_V212 |PLANE_CTL_YUV422_YUYV ; +case DRM_FORMAT_V216 : +return PLANE_CTL_FORMAT_V216 |PLANE_CTL_YUV422_YUYV ;default :MISSING_CASE (pixel_format); }
@@ -4807,6 +4816,9 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,case DRM_FORMAT_Y410 :case DRM_FORMAT_Y412 :case DRM_FORMAT_Y416 : +case DRM_FORMAT_V210 : +case DRM_FORMAT_V212 : +case DRM_FORMAT_V216 :break ;default : DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported scaling format 0x%x\n",
@@ -12954,6 +12966,9 @@ static bool skl_mod_supported(uint32_t format, uint64_t modifier)case DRM_FORMAT_YVYU :case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY : +case DRM_FORMAT_V210 : +case DRM_FORMAT_V212 : +case DRM_FORMAT_V216 :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
@@ -13202,9 +13217,9 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) num_formats =ARRAY_SIZE (skl_primary_formats);if (INTEL_GEN (dev_priv) ==9 && (pipe ==PIPE_C )) - num_formats -=4 ; + num_formats -=7 ;else if (INTEL_GEN (dev_priv) ==9 ) - num_formats -=3 ; + num_formats -=6 ;if (skl_plane_has_ccs (dev_priv, pipe,PLANE_PRIMARY )) modifiers = skl_format_modifiers_ccs;
@@ -14003,6 +14018,9 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,case DRM_FORMAT_UYVY :case DRM_FORMAT_YVYU :case DRM_FORMAT_VYUY : +case DRM_FORMAT_V210 : +case DRM_FORMAT_V212 : +case DRM_FORMAT_V216 :if (INTEL_GEN (dev_priv) <5 && !IS_G4X (dev_priv)) {DRM_DEBUG_KMS ("unsupported pixel format: %s\n" ,drm_get_format_name (mode_cmd->pixel_format, &format_name));
@@ -14017,7 +14035,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, goto err; }break ; -case DRM_FORMAT_Y410 +case DRM_FORMAT_Y410 :case DRM_FORMAT_Y412 :case DRM_FORMAT_Y416 :if (INTEL_GEN (dev_priv) <10 ) {
drivers/gpu/drm/i915/intel_sprite.c +9 -3
@@ -1165,6 +1165,9 @@ static uint32_t skl_plane_formats[] = {DRM_FORMAT_Y410 ,DRM_FORMAT_Y412 ,DRM_FORMAT_Y416 , +DRM_FORMAT_V210 , +DRM_FORMAT_V212 , + DRM_FORMAT_V216, }; static const uint64_t skl_plane_format_modifiers_noccs[] = {
@@ -1193,7 +1196,7 @@ static bool g4x_mod_supported(uint32_t format, uint64_t modifier)case DRM_FORMAT_YVYU :case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY : -if (modifier ==DRM_FORMAT_MOD_LINEAR || +if (modifier ==DRM_FORMAT_MOD_LINEAR || modifier ==I915_FORMAT_MOD_X_TILED )return true;/* fall through */
@@ -1261,6 +1264,9 @@ static bool skl_mod_supported(uint32_t format, uint64_t modifier)case DRM_FORMAT_YVYU :case DRM_FORMAT_UYVY :case DRM_FORMAT_VYUY : +case DRM_FORMAT_V210 : +case DRM_FORMAT_V212 : +case DRM_FORMAT_V216 :if (modifier == I915_FORMAT_MOD_Yf_TILED)return true;/* fall through */
@@ -1365,9 +1371,9 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,if (INTEL_GEN (dev_priv) <=10 && ((plane !=0 ) || (pipe ==PIPE_C ))) - num_plane_formats -=4 ; + num_plane_formats -=7 ;else if (INTEL_GEN (dev_priv) <=10 ) - num_plane_formats -=3 ; + num_plane_formats -=6 ;if (skl_plane_has_ccs (dev_priv, pipe,PLANE_SPRITE0 + plane)) modifiers = skl_plane_format_modifiers_ccs;
include/uapi/drm/drm_fourcc.h +3 -0
@@ -117,6 +117,9 @@ extern "C" {#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2')/* [64:0] A:V:Y:U 12:12:12:12 little endian */ #define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6')/* [64:0] A:V:Y:U 16:16:16:16 little endian */ +#define DRM_FORMAT_V210 fourcc_code('V', '2', '1', '0')/* [31:0] A:V:Y:U 2:10:10:10 little endian */ +#define DRM_FORMAT_V212 fourcc_code('V', '2', '1', '2')/* [64:0] A:V:Y:U 12:12:12:12 little endian */ +#define DRM_FORMAT_V216 fourcc_code('V', '2', '1', '6')/* [64:0] A:V:Y:U 16:16:16:16 little endian */ /* * 2 plane RGB + A
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Display WA #0827 for NV12 to RGB switch (rev4)
In reply to Vidya Srinivas== Series Details ==
== Series Details ==
Series: drm/i915: Display WA #0827 for NV12 to RGB switch (rev4)
URL : https://patchwork.freedesktop.org/series/37729/
State : failure
== Summary ==
Applying: YUV444 10/12/16 bit declarations and additions
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M drivers/gpu/drm/drm_fourcc.c
M drivers/gpu/drm/i915/i915_reg.h
M drivers/gpu/drm/i915/intel_display.c
M drivers/gpu/drm/i915/intel_sprite.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_sprite.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_sprite.c Auto-merging drivers/gpu/drm/i915/intel_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c Auto-merging drivers/gpu/drm/i915/i915_reg.h
Auto-merging drivers/gpu/drm/drm_fourcc.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/drm_fourcc.c Patch failed at 0001 YUV444 10/12/16 bit declarations and additions The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 62 lines · Vidya Srinivas
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 plane is enabled.Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+)drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -3822,6 +3822,9 @@ enum {#define _CLKGATE_DIS_PSL_A 0x46520#define _CLKGATE_DIS_PSL_B 0x46524#define _CLKGATE_DIS_PSL_C 0x46528 +#define DUPS1_GATING_DIS (1 << 15) +#define DUPS2_GATING_DIS (1 << 19) +#define DUPS3_GATING_DIS (1 << 23)#define DPF_GATING_DIS (1 << 10)#define DPF_RAM_GATING_DIS (1 << 9)#define DPFR_GATING_DIS (1 << 8)drivers/gpu/drm/i915/intel_display.c +15
-0@@ -5495,6 +5495,20 @@ static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,I915_WRITE (CLKGATE_DIS_PSL (pipe), val); } +static void skl_wa_clkgate (struct drm_i915_private *dev_priv, +int pipe,int enable) +{ +if (pipe ==PIPE_A || pipe ==PIPE_B ) { +if (enable) +I915_WRITE (CLKGATE_DIS_PSL (pipe), +DUPS1_GATING_DIS |DUPS2_GATING_DIS ); +else +I915_WRITE (CLKGATE_DIS_PSL (pipe), +I915_READ (CLKGATE_DIS_PSL (pipe)) & + ~(DUPS1_GATING_DIS |DUPS2_GATING_DIS )); + } +} +static void haswell_crtc_enable (struct intel_crtc_state *pipe_config,struct drm_atomic_state *old_state) {@@ -5599,6 +5613,7 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,intel_wait_for_vblank (dev_priv, hsw_workaround_pipe);intel_wait_for_vblank (dev_priv, hsw_workaround_pipe); } +skl_wa_clkgate (dev_priv, pipe,1 ); }static void ironlake_pfit_disable (struct intel_crtc *crtc,bool force)
drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · line 5728
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-0@@ -5709,6 +5724,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,intel_ddi_disable_pipe_clock (intel_crtc->config);intel_encoders_post_disable (crtc, old_crtc_state, old_state); +skl_wa_clkgate (dev_priv, intel_crtc->pipe,0 ); }
Unless I'm misreading the context of this patch you're applying a workaround, that by name seems to be for Skylake only, to: Haswell, Broadwell, and gen9+.
Either the name is incorrect, or the application of it.
As per BSpec the workaround seems to be for all of gen9 and only A-stepping of gen10. I don't see it listed for Haswell or Broadwell.
Cross-referencing the WA-database with Bspec, based on the HSD link, it seems that this issue *might* be WaDups1GatingDisableClockGatingForMPO; if this is the case it might make sense to include that WA name too. At the very least there should always be a comment mentioning the workaround name/number and the platform(s) it applies to.
Also, according to the WA database, if the above mentioned issue really is the same, the WA is *NOT* necessary on GLK (seeing as GLK uses gen10 display this might make sense, though the WA database sometimes contains mistakes).
Regards, David
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0
-0static void i9xx_pfit_enable (struct intel_crtc *crtc)Signature · 6 lines
1.9.1 _______________________________________________ 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
Sorry, my bad. This was a wrong push from my end. I have changed the tag to Not applicable. Apologies.
Have sent out the NV12 series separately.
Regards
Vidya
Quoted 97 lines
-----Original Message-----
From: David Weinehall [mailto:[email protected]]
Sent: Tuesday, February 6, 2018 5:34 PM
To: Srinivas, Vidya <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Display WA #0827 for NV12 to RGB switchQuoted 6 lines · Vidya Srinivas
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 planeis enabled.
drivers/gpu/drm/i915/intel_display.c static void
Quoted 28 lines
Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 8f36023..c4af05e 100644drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -3822,6 +3822,9 @@ enum {#define _CLKGATE_DIS_PSL_A 0x46520#define _CLKGATE_DIS_PSL_B 0x46524#define _CLKGATE_DIS_PSL_C 0x46528 +#define DUPS1_GATING_DIS (1 << 15) +#define DUPS2_GATING_DIS (1 << 19) +#define DUPS3_GATING_DIS (1 << 23)#define DPF_GATING_DIS (1 << 10)#define DPF_RAM_GATING_DIS (1 << 9)#define DPFR_GATING_DIS (1 << 8)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5495,6 +5495,20 @@ static voidglk_pipe_scaler_clock_gating_wa(struct
drm_i915_private*dev_priv,Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +6
-0I915_WRITE (CLKGATE_DIS_PSL (pipe), val); } +static void skl_wa_clkgate (struct drm_i915_private *dev_priv, +int pipe,int enable) +{ +if (pipe ==PIPE_A || pipe ==PIPE_B ) { +if (enable) + I915_WRITE(CLKGATE_DIS_PSL(pipe),drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +8
-0+ DUPS1_GATING_DIS | DUPS2_GATING_DIS); + else + I915_WRITE(CLKGATE_DIS_PSL(pipe), + I915_READ(CLKGATE_DIS_PSL(pipe)) & + ~(DUPS1_GATING_DIS|DUPS2_GATING_DIS)); + } +} +static void haswell_crtc_enable (struct intel_crtc_state *pipe_config, struct drm_atomic_state *old_state) { @@-5599,6 +5613,7 @@
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +0
-0static void haswell_crtc_enable (struct intel_crtc_state *pipe_config, intel_wait_for_vblank(dev_priv, hsw_workaround_pipe);drivers/gpu/drm/i915/intel_display.c +1
-0intel_wait_for_vblank (dev_priv, hsw_workaround_pipe); } +skl_wa_clkgate (dev_priv, pipe,1 ); } static void ironlake_pfit_disable(struct intel_crtc *crtc, boolforce) @@ -5709,6 +5724,7 @@ static void haswell_crtc_disable(struct
intel_crtc_state*old_crtc_state,drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · line 5728
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-0intel_ddi_disable_pipe_clock (intel_crtc->config);intel_encoders_post_disable (crtc, old_crtc_state, old_state); +skl_wa_clkgate (dev_priv, intel_crtc->pipe,0 ); }Unless I'm misreading the context of this patch you're applying a workaround, that by name seems to be for Skylake only, to: Haswell, Broadwell, and gen9+.
Either the name is incorrect, or the application of it.
As per BSpec the workaround seems to be for all of gen9 and only A- stepping of gen10.
I don't see it listed for Haswell or Broadwell.Cross-referencing the WA-database with Bspec, based on the HSD link, it seems that this issue *might* be WaDups1GatingDisableClockGatingForMPO; if this is the case it might make sense to include that WA name too. At the very least there should always be a comment mentioning the workaround name/number and the platform(s) it applies to.
Quoted 16 lines
Also, according to the WA database, if the above mentioned issue really is the same, the WA is *NOT* necessary on GLK (seeing as GLK uses gen10 display this might make sense, though the WA database sometimes contains mistakes).
Regards, David
Quoted 8 lines
static void
i9xx_pfit_enable(struct intel_crtc *crtc)
--
1.9.1_______________________________________________
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
Maarten Lankhorst
maintainerHey,
Op 06-02-18 om 12:06 schreef Vidya Srinivas:
Quoted 9 lines
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 plane is enabled.Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>
Is it required to leave the workaround enabled all the time? And how can I reproduce it? I tried to write a dumb testcase (below) to expose this issue, but didn't have much luck..
---
tests/Makefile.sources +1 -0
@@ -192,6 +192,7 @@ TESTS_progs = \ kms_legacy_colorkey \ kms_mmap_write_crc \ kms_mmio_vs_cs_flip \ + kms_nv12 \ kms_panel_fitting \ kms_pipe_b_c_ivb \ kms_pipe_crc_basic \
tests/kms_nv12.c new file +195 -0
195 lines not on this page · raw message
tests/meson.build +1 -0
@@ -170,6 +170,7 @@ test_progs = [ 'kms_legacy_colorkey', 'kms_mmap_write_crc', 'kms_mmio_vs_cs_flip', + 'kms_nv12', 'kms_panel_fitting', 'kms_pipe_b_c_ivb', 'kms_pipe_crc_basic',
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Maarten
Sorry, my bad. This was a wrong push from my end. I have changed the tag to Not applicable. Apologies.
Have sent out the NV12 series separately.
Regards
Vidya
Quoted 269 lines
-----Original Message-----
From: Maarten Lankhorst [mailto:[email protected]]
Sent: Tuesday, February 6, 2018 7:33 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Cc: Kamath, Sunil <[email protected]>; Sharma, Shashank <[email protected]>; Shankar, Uma <[email protected]>; Konduru, Chandra <[email protected]>
Subject: Re: [PATCH] drm/i915: Display WA #0827 for NV12 to RGB switchHey,
Op 06-02-18 om 12:06 schreef Vidya Srinivas:
Quoted 6 lines
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 planeis enabled.
Quoted 3 lines
Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>Is it required to leave the workaround enabled all the time? And how can I reproduce it? I tried to write a dumb testcase (below) to expose this issue, but didn't have much luck..
---tests/Makefile.sources index renamed from tests/Makefile.sources +0
-0
870c9093550b..f536db0fa433100644tests/Makefile.sources +1
-0@@ -192,6 +192,7 @@ TESTS_progs = \ kms_legacy_colorkey \ kms_mmap_write_crc \ kms_mmio_vs_cs_flip \ + kms_nv12 \ kms_panel_fitting \ kms_pipe_b_c_ivb \ kms_pipe_crc_basic \tests/kms_nv12.c new file +18
-0@@ -0,0 +1,195 @@ +/* +* Permission is hereby granted, free of charge, to any person +obtaining a +* copy of this software and associated documentation files (the +"Software"), +* to deal in the Software without restriction, including without +limitation +* the rights to use, copy, modify, merge, publish, distribute, +sublicense, +* and/or sell copies of the Software, and to permit persons to whom +the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be +included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
tests/kms_nv12.c new file +4
-0+EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY , + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NOEVENT
+SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHERtests/kms_nv12.c new file +87
-0+DEALINGS +* IN THE SOFTWARE. +* +* Authors: +* Maarten Lankhorst +*/ +#include "config.h" + +#include "igt.h" +#include +#include +#include +#include +#include + +typedef struct { +igt_display_t display; + +igt_pipe_crc_t *pipe_crc; +struct igt_fb fb[4 ]; +} data_t; + +static bool plane_supports_format (igt_plane_t *plane,uint32_t format) +{ +int i; + +if (!igt_fb_supported_format (format)) +return false; + +for (i =0 ; i < plane->drm_plane->count_formats; i++) +if (plane->drm_plane->formats[i] == format) +return true; + +return false; +} + +static bool pipe_supports_format (igt_display_t *display,enum pipe +pipe,uint32_t format) { +igt_plane_t *plane; + +for_each_plane_on_pipe (display, pipe, plane) +if (plane_supports_format (plane, format)) +return true; + +return false; +} + +static void remove_fbs (data_t *data) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (data->fb); i++) +igt_remove_fb (data->display.drm_fd, &data->fb[i]); } + +static void prepare_crtc (data_t *data,enum pipe pipe,igt_output_t +*output) { +igt_display_t *display = &data->display; + +remove_fbs (data); +igt_display_reset (display); +igt_output_set_pipe (output, pipe); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +igt_pipe_crc_free (data->pipe_crc); + data->pipe_crc =igt_pipe_crc_new (display->drm_fd, pipe, +INTEL_PIPE_CRC_SOURCE_AUTO ); } + +static void set_fb (igt_plane_t *plane,struct igt_fb *fb) { +igt_plane_set_fb (plane, fb); + +if (fb && fb->tiling ==LOCAL_I915_FORMAT_MOD_Y_TILED ) { +igt_plane_set_rotation (plane,IGT_ROTATION_90 ); +igt_plane_set_size (plane, fb->height, fb->width); + }else +igt_plane_set_rotation (plane,IGT_ROTATION_0 ); } + +static void nv12_rgb_switch (data_t *data,enum pipe pipe,igt_output_t +*output) { +drmModeModeInfo *mode =igt_output_get_mode (output); +igt_display_t *display = &data->display; +igt_plane_t *plane; +int i; +igt_crc_t ref_crc[4 ], crc; + +prepare_crtc (data, pipe, output); + + igt_create_pattern_fb(display->drm_fd, mode->hdisplay, mode-Quoted 1 line
vdisplay,
tests/kms_nv12.c new file +1
-0+ DRM_FORMAT_NV12,
LOCAL_I915_FORMAT_MOD_X_TILED,tests/kms_nv12.c new file +3
-0+ &data->fb[0]); + + igt_create_pattern_fb(display->drm_fd, mode->vdisplay, mode-Quoted 1 line
hdisplay,
tests/kms_nv12.c new file +1
-0+ DRM_FORMAT_NV12,
LOCAL_I915_FORMAT_MOD_Y_TILED,tests/kms_nv12.c new file +3
-0+ &data->fb[1]); + + igt_create_pattern_fb(display->drm_fd, mode->hdisplay, mode-Quoted 1 line
vdisplay,
tests/kms_nv12.c new file +1
-0+ DRM_FORMAT_XRGB8888,
LOCAL_I915_FORMAT_MOD_X_TILED,tests/kms_nv12.c new file +3
-0+ &data->fb[2]); + + igt_create_pattern_fb(display->drm_fd, mode->vdisplay, mode-Quoted 1 line
hdisplay,
tests/kms_nv12.c new file +1
-0+ DRM_FORMAT_XRGB8888,
LOCAL_I915_FORMAT_MOD_Y_TILED,tests/kms_nv12.c new file +20
-0+ &data->fb[3]); + +for_each_plane_on_pipe (display, pipe, plane) +if (plane->type !=DRM_PLANE_TYPE_CURSOR ) +set_fb (plane, &data->fb[3 ]); + +for_each_plane_on_pipe (display, pipe, plane) { +const int seq[] = { +2 ,0 ,2 ,1 ,3 ,1 ,3 + }; + +if (!plane_supports_format (plane,DRM_FORMAT_NV12 )) +continue ; + +/* Collect reference crc with toggle in between. */ +for (i =0 ; i <ARRAY_SIZE (ref_crc); i++) { +set_fb (plane, &data->fb[i]); +igt_display_commit2 (display,COMMIT_ATOMIC ); + + igt_pipe_crc_collect_crc(data->pipe_crc,&ref_crc[i]);
tests/kms_nv12.c new file +24
-0+ +set_fb (plane,NULL ); +igt_display_commit2 (display,COMMIT_ATOMIC ); + } + +for (i =0 ; i <ARRAY_SIZE (seq); i++) { +int j = seq[i]; + +set_fb (plane, &data->fb[j]); +igt_display_commit2 (display,COMMIT_ATOMIC ); + +igt_pipe_crc_collect_crc (data->pipe_crc, &crc); +igt_assert_crc_equal (&ref_crc[j], &crc); + } + } +} + +static void run_tests_for_pipe (data_t *data,enum pipe pipe) { +igt_output_t *output; +igt_display_t *display = &data->display; + + igt_fixture { +igt_display_require_output_on_pipe (display ,pipe ); + igt_require(pipe_supports_format(display, pipe,
DRM_FORMAT_NV12));tests/kms_nv12.c new file +3
-0+ } + + igt_subtest_f("pipe-%s-nv12-rgb-switch",
kmstest_pipe_name(pipe))tests/kms_nv12.c new file +12
-0+for_each_valid_output_on_pipe (display, pipe, output) +nv12_rgb_switch (data, pipe, output); } + +igt_main +{ +data_t data = {}; +enum pipe pipe; + +igt_skip_on_simulation (); + + igt_fixture { + data.display.drm_fd =
drm_open_driver_master(DRIVER_ANY);tests/kms_nv12.c new file +15
-0+ +kmstest_set_vt_graphics_mode (); +igt_display_init (&data.display, data.display.drm_fd); +igt_require (data.display.is_atomic); + } + +for_each_pipe_static (pipe) + igt_subtest_group +run_tests_for_pipe (&data, pipe); + + igt_fixture { +igt_display_fini (&data.display); +close (data.display.drm_fd); + } +}tests/meson.build index renamed from tests/meson.build +0
-0
521a4c425a68..cfcd476ccd10100644
tests/meson.build test_progs = [ · line 176
Quoted 7 lines
tests/meson.build +1
-0@@ -170,6 +170,7 @@ test_progs = [ 'kms_legacy_colorkey', 'kms_mmap_write_crc', 'kms_mmio_vs_cs_flip', + 'kms_nv12', 'kms_panel_fitting', 'kms_pipe_b_c_ivb', 'kms_pipe_crc_basic',
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Regards
Shashank
Quoted 19 lines · Vidya Srinivas
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 plane is enabled.Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 3827
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -3822,6 +3822,9 @@ enum {#define _CLKGATE_DIS_PSL_A 0x46520#define _CLKGATE_DIS_PSL_B 0x46524#define _CLKGATE_DIS_PSL_C 0x46528 +#define DUPS1_GATING_DIS (1 << 15) +#define DUPS2_GATING_DIS (1 << 19) +#define DUPS3_GATING_DIS (1 << 23)
Bit definition should be aligned by one extra space (like below), also the bit sequence should be high -> low (so 23,19 and then 15)
drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5499
Quoted 13 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define DPF_GATING_DIS (1 << 10)#define DPF_RAM_GATING_DIS (1 << 9)#define DPFR_GATING_DIS (1 << 8)drivers/gpu/drm/i915/intel_display.c +2
-0@@ -5495,6 +5495,20 @@ static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv,I915_WRITE (CLKGATE_DIS_PSL (pipe), val); } +static void skl_wa_clkgate (struct drm_i915_private *dev_priv, +int pipe,int enable)
Do we need an int ? or bool enable ? also This line should be aligned to opening brace '(' above.
drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5504
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +5
-0+{ +if (pipe ==PIPE_A || pipe ==PIPE_B ) { +if (enable) +I915_WRITE (CLKGATE_DIS_PSL (pipe), +DUPS1_GATING_DIS |DUPS2_GATING_DIS );
Alignment, also we are overwriting all other bits here, this should be I915_WRITE(CLKGATE_DIS_PSL(pipe), I915_READ(CLKGATE_DIS_PSL(pipe)) |= (DUPS1_GATING_DIS | DUPS2_GATING_DIS) )
drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5507
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+else + I915_WRITE(CLKGATE_DIS_PSL(pipe), + I915_READ(CLKGATE_DIS_PSL(pipe)) &
This line should be aligned to the '(' above
drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_enable(struct intel_crtc_state *pipe_config, · line 5616
Quoted 12 lines
drivers/gpu/drm/i915/intel_display.c +5
-0+ ~(DUPS1_GATING_DIS|DUPS2_GATING_DIS)); + } +} +static void haswell_crtc_enable (struct intel_crtc_state *pipe_config,struct drm_atomic_state *old_state) {@@ -5599,6 +5613,7 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,intel_wait_for_vblank (dev_priv, hsw_workaround_pipe);intel_wait_for_vblank (dev_priv, hsw_workaround_pipe); } +skl_wa_clkgate (dev_priv, pipe,1 );
send true from here (instead of 1)
drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · line 5727
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1
-0}static void ironlake_pfit_disable (struct intel_crtc *crtc,bool force)@@ -5709,6 +5724,7 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,intel_ddi_disable_pipe_clock (intel_crtc->config);intel_encoders_post_disable (crtc, old_crtc_state, old_state); +skl_wa_clkgate (dev_priv, intel_crtc->pipe,0 );
send false from here (instead of 0)
drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · line 5730
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +0
-0}static void i9xx_pfit_enable (struct intel_crtc *crtc)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Apologies. This patch was pushed wrongly. Not a part of the 16 patch series of NV12.
Regards
Vidya
Quoted 89 lines
-----Original Message-----
From: Sharma, Shashank
Sent: Thursday, February 8, 2018 6:08 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Cc: [email protected]; Kamath, Sunil <[email protected]>; Shankar, Uma <[email protected]>; Konduru, Chandra <[email protected]>
Subject: Re: [PATCH] drm/i915: Display WA #0827 for NV12 to RGB switchRegards
Shashank
Quoted 6 lines · Vidya Srinivas
From: Chandra Konduru <[email protected]>
Display WA #0827:
Switching the plane format from NV12 to RGB and leaving system idle results in display underrun and corruption. WA: Set the bit 15 & bit 19 to 1b in theCLKGATE_DIS_PSLregister for the pipe in which NV12 planeis enabled.
Quoted 13 lines
Signed-off-by Chandra Konduru <[email protected]>Signed-off-by Vidya Srinivas <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 8f36023..c4af05e 100644drivers/gpu/drm/i915/i915_reg.h enum { · line 3827
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -3822,6 +3822,9 @@ enum {#define _CLKGATE_DIS_PSL_A 0x46520#define _CLKGATE_DIS_PSL_B 0x46524#define _CLKGATE_DIS_PSL_C 0x46528 +#define DUPS1_GATING_DIS (1 << 15) +#define DUPS2_GATING_DIS (1 << 19) +#define DUPS3_GATING_DIS (1 << 23)Bit definition should be aligned by one extra space (like below), also the bit sequence should be high -> low (so 23,19 and then 15)
drivers/gpu/drm/i915/intel_display.c static void
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define DPF_GATING_DIS (1 << 10)#define DPF_RAM_GATING_DIS (1 << 9)#define DPFR_GATING_DIS (1 << 8)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5495,6 +5495,20 @@ static voidglk_pipe_scaler_clock_gating_wa(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5499
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +2
-0I915_WRITE (CLKGATE_DIS_PSL (pipe), val); } +static void skl_wa_clkgate (struct drm_i915_private *dev_priv, +int pipe,int enable)Do we need an int ? or bool enable ? also This line should be aligned to opening brace '(' above.
drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5504
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +5
-0+{ +if (pipe ==PIPE_A || pipe ==PIPE_B ) { +if (enable) +I915_WRITE (CLKGATE_DIS_PSL (pipe), +DUPS1_GATING_DIS |DUPS2_GATING_DIS );Alignment, also we are overwriting all other bits here, this should be
I915_WRITE(CLKGATE_DIS_PSL(pipe), I915_READ(CLKGATE_DIS_PSL(pipe)) |= (DUPS1_GATING_DIS | DUPS2_GATING_DIS) )drivers/gpu/drm/i915/intel_display.c static void glk_pipe_scaler_clock_gating_wa(struct drm_i915_private *dev_priv, · line 5507
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+else + I915_WRITE(CLKGATE_DIS_PSL(pipe), + I915_READ(CLKGATE_DIS_PSL(pipe)) &This line should be aligned to the '(' above
drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_enable(struct
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +4
-0+ ~(DUPS1_GATING_DIS|DUPS2_GATING_DIS)); + } +} +static void haswell_crtc_enable (struct intel_crtc_state *pipe_config,struct drm_atomic_state *old_state) {@@ -5599,6 +5613,7 @@ static void haswell_crtc_enable(struct
intel_crtc_state*pipe_config,drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_enable(struct intel_crtc_state *pipe_config, · line 5616
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +1
-0intel_wait_for_vblank (dev_priv, hsw_workaround_pipe);intel_wait_for_vblank (dev_priv, hsw_workaround_pipe); } +skl_wa_clkgate (dev_priv, pipe,1 );send true from here (instead of 1)
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0
-0}
Quoted 11 lines
Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0
-0static void ironlake_pfit_disable(struct intel_crtc *crtc, boolforce) @@ -5709,6 +5724,7 @@ static void haswell_crtc_disable(struct
intel_crtc_state*old_crtc_state,drivers/gpu/drm/i915/intel_display.c static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state, · line 5727
Quoted 4 lines
intel_ddi_disable_pipe_clock(intel_crtc->config); intel_encoders_post_disable(crtc, old_crtc_state, old_state);drivers/gpu/drm/i915/intel_display.c +1
-0+skl_wa_clkgate (dev_priv, intel_crtc->pipe,0 );send false from here (instead of 0)
Quoted 3 lines
}static void
i9xx_pfit_enable(struct intel_crtc *crtc)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx