Fixed16.16 wrapper cleanup & wm optimization
Subsystems (2)
cover Fixed16.16 wrapper cleanup & wm optimization
This series Include patches for:
clean fixed16.16 naming & make them consistent optimize wm calculation code enable/Implement trans wm calculation
Changes Since V1:
- Split fixed16 cleanup code in more logical patches (Maarten)
- make intel_compute_linetime_wm function static (Maarten)
Changes Since V2:
- Rebase
Changes Since V3:
- enable IPC Workarounds and IPC
Kumar, Mahesh (11):
drm/i915: take-out common clamping code of fixed16 wrappers drm/i915: Always perform internal fixed16 division in 64 bits drm/i915: cleanup fixed-point wrappers naming drm/i915: Addition wrapper for fixed16.16 operation drm/i915/skl+: WM calculation don't require height drm/i915/skl+: unify cpp value in WM calculation drm/i915/skl+: Optimize WM calculation drm/i915/gen10: Calculate and enable transition WM drm/i915/glk: IPC linetime watermark workaround for GLK drm/i915/cnl: Extend WM workaround with IPC for CNL drm/i915/bxt: Enable IPC support
drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 83 ++++++---- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 303 ++++++++++++++++++++++------------- 6 files changed, 247 insertions(+), 146 deletions(-)
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/11 drm/i915: take-out common clamping code of fixed16 wrappers
From: "Kumar, Mahesh" <[email protected]>
This patch creates a new function for clamping u64 to fixed16. And make use of this function in other fixed16 wrappers.
--- drivers/gpu/drm/i915/i915_drv.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +12 -16
@@ -160,6 +160,14 @@ static inline uint_fixed_16_16_t max_fixed_16_16(uint_fixed_16_16_t max1,return max; } +static inline uint_fixed_16_16_t clamp_u64_to_fixed16 (uint64_t val) +{ +uint_fixed_16_16_t fp; +WARN_ON (val >>32 ); + fp.val =clamp_t (uint32_t, val,0 , ~0 ); +return fp; +} +static inline uint32_t div_round_up_fixed16 (uint_fixed_16_16_t val,uint_fixed_16_16_t d) {
@@ -170,26 +178,21 @@ static inline uint32_t mul_round_up_u32_fixed16(uint32_t val, uint_fixed_16_16_t mul) {uint64_t intermediate_val; -uint32_t result; intermediate_val = (uint64_t ) val * mul.val; intermediate_val =DIV_ROUND_UP_ULL (intermediate_val,1 <<16 );WARN_ON (intermediate_val >>32 ); - result =clamp_t (uint32_t, intermediate_val,0 , ~0 ); -return result; +return clamp_t (uint32_t, intermediate_val,0 , ~0 ); }static inline uint_fixed_16_16_t mul_fixed16 (uint_fixed_16_16_t val,uint_fixed_16_16_t mul) {uint64_t intermediate_val; -uint_fixed_16_16_t fp; intermediate_val = (uint64_t ) val.val * mul.val; intermediate_val = intermediate_val >>16 ; -WARN_ON (intermediate_val >>32 ); - fp.val =clamp_t (uint32_t, intermediate_val,0 , ~0 ); -return fp; +return clamp_u64_to_fixed16 (intermediate_val); }static inline uint_fixed_16_16_t fixed_16_16_div (uint32_t val,uint32_t d)
@@ -203,15 +206,11 @@ static inline uint_fixed_16_16_t fixed_16_16_div(uint32_t val, uint32_t d)static inline uint_fixed_16_16_t fixed_16_16_div_u64 (uint32_t val,uint32_t d) { -uint_fixed_16_16_t res;uint64_t interm_val; interm_val = (uint64_t )val <<16 ; interm_val =DIV_ROUND_UP_ULL (interm_val, d); -WARN_ON (interm_val >>32 ); - res.val = (uint32_t ) interm_val; - -return res; +return clamp_u64_to_fixed16 (interm_val); } static inline uint32_t div_round_up_u32_fixed16(uint32_t val,
@@ -229,12 +228,9 @@ static inline uint_fixed_16_16_t mul_u32_fixed_16_16(uint32_t val, uint_fixed_16_16_t mul) {uint64_t intermediate_val; -uint_fixed_16_16_t fp; intermediate_val = (uint64_t ) val * mul.val; -WARN_ON (intermediate_val >>32 ); - fp.val = (uint32_t ) intermediate_val; -return fp; +return clamp_u64_to_fixed16 (intermediate_val); }static inline const char *yesno (bool v)
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 01/11] drm/i915: take-out common clamping code of fixed16 wrappers
Quoted 16 lines · Mahesh Kumar
From: "Kumar, Mahesh" <[email protected]>
This patch creates a new function for clamping u64 to fixed16. And make use of this function in other fixed16 wrappers.
Signed-off-by Mahesh Kumar <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h static inline uint_fixed_16_16_t max_fixed_16_16(uint_fixed_16_16_t max1, · line 166
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -160,6 +160,14 @@ static inline uint_fixed_16_16_t max_fixed_16_16(uint_fixed_16_16_t max1,return max; } +static inline uint_fixed_16_16_t clamp_u64_to_fixed16 (uint64_t val) +{ +uint_fixed_16_16_t fp; +WARN_ON (val >>32 );
WARN_ON(val > U32_MAX); makes much more sense. Same all over the place.
drivers/gpu/drm/i915/i915_drv.h static inline uint_fixed_16_16_t max_fixed_16_16(uint_fixed_16_16_t max1, · line 167
Quoted 1 line
drivers/gpu/drm/i915/i915_drv.h +1
-0+ fp.val =clamp_t (uint32_t, val,0 , ~0 );
The use of clamp_t here is pointless, as fp.val is uint32_t. Assign, possibly with a cast, and be done with it.
Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.h +3
-0+return fp; +} +static inline uint32_t div_round_up_fixed16 (uint_fixed_16_16_t val,uint_fixed_16_16_t d) {@@ -170,26 +178,21 @@ static inline uint32_t mul_round_up_u32_fixed16(uint32_t val, uint_fixed_16_16_t mul)
drivers/gpu/drm/i915/i915_drv.h static inline uint32_t mul_round_up_u32_fixed16(uint32_t val, · line 185
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +1
-3{uint64_t intermediate_val; -uint32_t result; intermediate_val = (uint64_t ) val * mul.val; intermediate_val =DIV_ROUND_UP_ULL (intermediate_val,1 <<16 );WARN_ON (intermediate_val >>32 ); - result =clamp_t (uint32_t, intermediate_val,0 , ~0 ); -return result; +return clamp_t (uint32_t, intermediate_val,0 , ~0 );
Same here, the function is uint32_t, just return with a cast.
Quoted 48 lines
drivers/gpu/drm/i915/i915_drv.h +3
-13}static inline uint_fixed_16_16_t mul_fixed16 (uint_fixed_16_16_t val,uint_fixed_16_16_t mul) {uint64_t intermediate_val; -uint_fixed_16_16_t fp; intermediate_val = (uint64_t ) val.val * mul.val; intermediate_val = intermediate_val >>16 ; -WARN_ON (intermediate_val >>32 ); - fp.val =clamp_t (uint32_t, intermediate_val,0 , ~0 ); -return fp; +return clamp_u64_to_fixed16 (intermediate_val); }static inline uint_fixed_16_16_t fixed_16_16_div (uint32_t val,uint32_t d)@@ -203,15 +206,11 @@ static inline uint_fixed_16_16_t fixed_16_16_div(uint32_t val, uint32_t d)static inline uint_fixed_16_16_t fixed_16_16_div_u64 (uint32_t val,uint32_t d) { -uint_fixed_16_16_t res;uint64_t interm_val; interm_val = (uint64_t )val <<16 ; interm_val =DIV_ROUND_UP_ULL (interm_val, d); -WARN_ON (interm_val >>32 ); - res.val = (uint32_t ) interm_val; - -return res; +return clamp_u64_to_fixed16 (interm_val); } static inline uint32_t div_round_up_u32_fixed16(uint32_t val,@@ -229,12 +228,9 @@ static inline uint_fixed_16_16_t mul_u32_fixed_16_16(uint32_t val, uint_fixed_16_16_t mul) {uint64_t intermediate_val; -uint_fixed_16_16_t fp; intermediate_val = (uint64_t ) val * mul.val; -WARN_ON (intermediate_val >>32 ); - fp.val = (uint32_t ) intermediate_val; -return fp; +return clamp_u64_to_fixed16 (intermediate_val); }static inline const char *yesno (bool v)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/11 drm/i915: Always perform internal fixed16 division in 64 bits
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
This patch combines fixed_16_16_div & fixed_16_16_div_u64 wrappers. And new fixed_16_16_div wrapper always performs division operation in u64 internally, to avoid any data loss which was happening in earlier version of wrapper.
earlier wrapper was converting u32 to fixed16 in 32 bit so we were loosing 16-MSB data.
--- drivers/gpu/drm/i915/i915_drv.h | 9 --------- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -9
@@ -197,15 +197,6 @@ static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,static inline uint_fixed_16_16_t fixed_16_16_div (uint32_t val,uint32_t d) { -uint_fixed_16_16_t fp, res; - - fp =u32_to_fixed_16_16 (val); - res.val =DIV_ROUND_UP (fp.val, d); -return res; -} - -static inline uint_fixed_16_16_t fixed_16_16_div_u64 (uint32_t val,uint32_t d) -{uint64_t interm_val; interm_val = (uint64_t )val <<16 ;
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -4276,7 +4276,7 @@ static uint_fixed_16_16_t skl_wm_method1(uint32_t pixel_rate, uint8_t cpp,return FP_16_16_MAX ; wm_intermediate_val = latency * pixel_rate * cpp; - ret =fixed_16_16_div_u64 (wm_intermediate_val,1000 *512 ); + ret =fixed_16_16_div (wm_intermediate_val,1000 *512 );return ret; }
@@ -4314,7 +4314,7 @@ intel_get_linetime_us(struct intel_crtc_state *cstate)return u32_to_fixed_16_16 (0 ); crtc_htotal = cstate->base.adjusted_mode.crtc_htotal; - linetime_us =fixed_16_16_div_u64 (crtc_htotal *1000 , pixel_rate); + linetime_us =fixed_16_16_div (crtc_htotal *1000 , pixel_rate);return linetime_us; }
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/11 drm/i915: cleanup fixed-point wrappers naming
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
This patch make naming of fixed-point wrappers consistent operation_<any_post_operation>_<1st operand>_<2nd operand> also shorten the name for fixed_16_16 to fixed16
s/u32_to_fixed_16_16/u32_to_fixed16 s/fixed_16_16_to_u32/fixed16_to_u32 s/fixed_16_16_to_u32_round_up/fixed16_to_u32_round_up s/min_fixed_16_16/min_fixed16 s/max_fixed_16_16/max_fixed16 s/mul_u32_fixed_16_16/mul_u32_fixed16 s/fixed_16_16_div/div_fixed16
Changes Since V1:
- Split the patch in more logical patches (Maarten)
Changes Since V2:
- Rebase
--- drivers/gpu/drm/i915/i915_drv.h | 14 ++++----- drivers/gpu/drm/i915/intel_pm.c | 63 ++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 39 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +7 -7
@@ -122,7 +122,7 @@ static inline bool is_fixed16_zero(uint_fixed_16_16_t val)return false; } -static inline uint_fixed_16_16_t u32_to_fixed_16_16 (uint32_t val) +static inline uint_fixed_16_16_t u32_to_fixed16 (uint32_t val) {uint_fixed_16_16_t fp;
@@ -132,17 +132,17 @@ static inline uint_fixed_16_16_t u32_to_fixed_16_16(uint32_t val)return fp; } -static inline uint32_t fixed_16_16_to_u32_round_up (uint_fixed_16_16_t fp) +static inline uint32_t fixed16_to_u32_round_up (uint_fixed_16_16_t fp) {return DIV_ROUND_UP (fp.val,1 <<16 ); } -static inline uint32_t fixed_16_16_to_u32 (uint_fixed_16_16_t fp) +static inline uint32_t fixed16_to_u32 (uint_fixed_16_16_t fp) {return fp.val >>16 ; } -static inline uint_fixed_16_16_t min_fixed_16_16 (uint_fixed_16_16_t min1, +static inline uint_fixed_16_16_t min_fixed16 (uint_fixed_16_16_t min1,uint_fixed_16_16_t min2) {uint_fixed_16_16_t min;
@@ -151,7 +151,7 @@ static inline uint_fixed_16_16_t min_fixed_16_16(uint_fixed_16_16_t min1,return min; } -static inline uint_fixed_16_16_t max_fixed_16_16 (uint_fixed_16_16_t max1, +static inline uint_fixed_16_16_t max_fixed16 (uint_fixed_16_16_t max1,uint_fixed_16_16_t max2) {uint_fixed_16_16_t max;
@@ -195,7 +195,7 @@ static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val,return clamp_u64_to_fixed16 (intermediate_val); } -static inline uint_fixed_16_16_t fixed_16_16_div (uint32_t val,uint32_t d) +static inline uint_fixed_16_16_t div_fixed16 (uint32_t val,uint32_t d) {uint64_t interm_val;
@@ -215,7 +215,7 @@ static inline uint32_t div_round_up_u32_fixed16(uint32_t val,return clamp_t (uint32_t, interm_val,0 , ~0 ); } -static inline uint_fixed_16_16_t mul_u32_fixed_16_16 (uint32_t val, +static inline uint_fixed_16_16_t mul_u32_fixed16 (uint32_t val,uint_fixed_16_16_t mul) {uint64_t intermediate_val;
drivers/gpu/drm/i915/intel_pm.c +31 -32
172 lines not on this page · raw message
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/11 drm/i915: Addition wrapper for fixed16.16 operation
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
This patch introduce addition wrapper for fixed point 16.16 operations. Which will be used by later patches to avoid direct member variables access of fixed_16_16_t structure.
add_fixed16 : takes 2 fixed_16_16_t variable & returns fixed_16_16_t add_fixed16_u32 : takes fixed_16_16_t & u32 variable & returns fixed_16_16_t
--- drivers/gpu/drm/i915/i915_drv.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +19 -0
@@ -224,6 +224,25 @@ static inline uint_fixed_16_16_t mul_u32_fixed16(uint32_t val,return clamp_u64_to_fixed16 (intermediate_val); } +static inline uint_fixed_16_16_t add_fixed16 (uint_fixed_16_16_t add1, +uint_fixed_16_16_t add2) +{ +uint64_t interm_sum; + + interm_sum = (uint64_t ) add1.val + add2.val; +return clamp_u64_to_fixed16 (interm_sum); +} + +static inline uint_fixed_16_16_t add_fixed16_u32 (uint_fixed_16_16_t add1, +uint32_t add2) +{ +uint64_t interm_sum; +uint_fixed_16_16_t interm_add2 =u32_to_fixed16 (add2); + + interm_sum = (uint64_t ) add1.val + interm_add2.val; +return clamp_u64_to_fixed16 (interm_sum); +} +static inline const char *yesno (bool v) {return v ?"yes" :"no" ;
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/11 drm/i915/skl+: WM calculation don't require height
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
height of plane was require to swap width/height in case of 90/270 rotation. Now src structure contains already swapped values, So we don't have to calculate height of the plane.
--- drivers/gpu/drm/i915/intel_pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -3
@@ -4361,7 +4361,7 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,uint32_t plane_bytes_per_line;uint32_t res_blocks, res_lines;uint8_t cpp; -uint32_t width =0 , height =0 ; +uint32_t width =0 ;uint32_t plane_pixel_rate;uint_fixed_16_16_t y_tile_minimum;uint32_t y_min_scanlines;
@@ -4390,7 +4390,6 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,if (plane->id ==PLANE_CURSOR ) { width = intel_pstate->base.crtc_w; - height = intel_pstate->base.crtc_h; }else {/* * Src coordinates are already rotated by 270 degrees for
@@ -4398,7 +4397,6 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,* GTT mapping), hence no need to account for rotation here. */ width =drm_rect_width (&intel_pstate->base.src) >>16 ; - height =drm_rect_height (&intel_pstate->base.src) >>16 ; } cpp = fb->format->cpp[0 ];
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/11 drm/i915/skl+: unify cpp value in WM calculation
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
use same cpp value in different phase of plane WM caluclation.
--- drivers/gpu/drm/i915/intel_pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +2 -4
@@ -4399,13 +4399,11 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, width =drm_rect_width (&intel_pstate->base.src) >>16 ; } - cpp = fb->format->cpp[0 ]; + cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? fb->format->cpp[1 ] : + fb->format->cpp[0 ]; plane_pixel_rate =skl_adjusted_plane_pixel_rate (cstate, intel_pstate);if (drm_rotation_90_or_270 (pstate->rotation)) { -int cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? - fb->format->cpp[1 ] : - fb->format->cpp[0 ];switch (cpp) {case 1 :
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 06/11] drm/i915/skl+: unify cpp value in WM calculation
Op 05-07-17 om 16:31 schreef Mahesh Kumar:
Quoted 20 lines
From: "Kumar, Mahesh" <[email protected]>
use same cpp value in different phase of plane WM caluclation.
Signed-off-by Mahesh Kumar <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -4399,13 +4399,11 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, width =drm_rect_width (&intel_pstate->base.src) >>16 ; } - cpp = fb->format->cpp[0 ]; + cpp = (fb->format->format == DRM_FORMAT_NV12) ? fb->format->cpp[1] :
drivers/gpu/drm/i915/intel_pm.c static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, · line 4409
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +1
-3+ fb->format->cpp[0 ]; plane_pixel_rate =skl_adjusted_plane_pixel_rate (cstate, intel_pstate);if (drm_rotation_90_or_270 (pstate->rotation)) { -int cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? - fb->format->cpp[1 ] : - fb->format->cpp[0 ];switch (cpp) {case 1 :
First 6 patches pushed, thanks.
I'll take a closer look at the other patches on monday. :)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 06/11] drm/i915/skl+: unify cpp value in WM calculation
Quoted 29 lines · Maarten Lankhorst
Op 05-07-17 om 16:31 schreef Mahesh Kumar:
Quoted 28 lines
From: "Kumar, Mahesh" <[email protected]>
use same cpp value in different phase of plane WM caluclation.
Signed-off-by Mahesh Kumar <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_pm.c +2
-4@@ -4399,13 +4399,11 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, width =drm_rect_width (&intel_pstate->base.src) >>16 ; } - cpp = fb->format->cpp[0 ]; + cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? fb->format->cpp[1 ] : + fb->format->cpp[0 ]; plane_pixel_rate =skl_adjusted_plane_pixel_rate (cstate, intel_pstate);if (drm_rotation_90_or_270 (pstate->rotation)) { -int cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? - fb->format->cpp[1 ] : - fb->format->cpp[0 ];
Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, · line 4409
Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0switch (cpp) {case 1 :First 6 patches pushed, thanks.
I guess I was too late with my review comments. But please do them as further cleanups.
BR,
Jani.
Quoted 7 lines
I'll take a closer look at the other patches on monday. :)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 06/11] drm/i915/skl+: unify cpp value in WM calculation
Hi Jani,
Thanks for review.
Quoted 30 lines · Jani Nikula
Quoted 29 lines · Maarten Lankhorst
Op 05-07-17 om 16:31 schreef Mahesh Kumar:
Quoted 28 lines
From: "Kumar, Mahesh" <[email protected]>
use same cpp value in different phase of plane WM caluclation.
Signed-off-by Mahesh Kumar <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_pm.c +2
-4@@ -4399,13 +4399,11 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, width =drm_rect_width (&intel_pstate->base.src) >>16 ; } - cpp = fb->format->cpp[0 ]; + cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? fb->format->cpp[1 ] : + fb->format->cpp[0 ]; plane_pixel_rate =skl_adjusted_plane_pixel_rate (cstate, intel_pstate);if (drm_rotation_90_or_270 (pstate->rotation)) { -int cpp = (fb->format->format ==DRM_FORMAT_NV12 ) ? - fb->format->cpp[1 ] : - fb->format->cpp[0 ];
Quoted 5 lines
Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, · line 4409
Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0switch (cpp) {case 1 :First 6 patches pushed, thanks.
I guess I was too late with my review comments. But please do them as further cleanups.
I'm going to push remaining patches, so please let me know if any further review comments. will address those & include as part of new series.
-Mahesh
Quoted 10 lines
BR,
Jani.Quoted 6 lines
I'll take a closer look at the other patches on monday. :)
_______________________________________________
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
PATCH 7/11 drm/i915/skl+: Optimize WM calculation
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
Plane configuration parameters doesn't change for each WM-level calculation. Currently we compute same parameters 8 times for each wm-level.
This patch optimizes it by calculating these parameters in beginning & reuse during each level-wm calculation.
--- drivers/gpu/drm/i915/i915_drv.h | 13 +++ drivers/gpu/drm/i915/intel_pm.c | 179 ++++++++++++++++++++++------------------ 2 files changed, 111 insertions(+), 81 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +13 -0
@@ -1790,6 +1790,19 @@ struct skl_wm_level {uint8_t plane_res_l; }; +/* Stores plane specific WM parameters */ +struct skl_wm_params { +bool x_tiled, y_tiled; +uint32_t width; +uint8_t cpp; +uint32_t plane_pixel_rate; +uint32_t y_min_scanlines; +uint32_t plane_bytes_per_line; +uint_fixed_16_16_t plane_blocks_per_line; +uint_fixed_16_16_t y_tile_minimum; +uint32_t linetime_us; +}; +/* * This struct helps tracking the state needed for runtime PM, which puts the * device in PCI D3 state. Notice that when this happens, nothing on the
drivers/gpu/drm/i915/intel_pm.c +98 -81
261 lines not on this page · raw message
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/11 drm/i915/gen10: Calculate and enable transition WM
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
GEN > 9 require transition WM to be programmed if IPC is enabled. This patch calculates & enable transition WM for supported platforms. If transition WM is enabled, Plane read requests are sent at high priority until filling above the transition watermark, then the requests are sent at lower priority until dropping below the level-0 WM. The lower priority requests allow other memory clients to have better memory access.
transition minimum is the minimum amount needed for trans_wm to work to ensure the demote does not happen before enough data has been read to meet the level 0 watermark requirements.
transition amount is configurable value. Higher values will tend to cause longer periods of high priority reads followed by longer periods of lower priority reads. Tuning to lower values will tend to cause shorter periods of high and lower priority reads.
Keeping transition amount to 10 in this patch, as suggested by HW team.
--- drivers/gpu/drm/i915/intel_pm.c | 51 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +49 -2
@@ -4579,12 +4579,55 @@ skl_compute_linetime_wm(struct intel_crtc_state *cstate) }static void skl_compute_transition_wm (struct intel_crtc_state *cstate, +struct skl_wm_params *wp, +struct skl_wm_level *wm_l0, +uint16_t ddb_allocation,struct skl_wm_level *trans_wm/* out */ ) { +struct drm_device *dev = cstate->base.crtc->dev; +const struct drm_i915_private *dev_priv =to_i915 (dev); +uint16_t trans_min, trans_y_tile_min; +uint16_t trans_amount =10 ;/* This is configurable amount */ +uint16_t trans_offset_b, res_blocks; +if (!cstate->base.active) + goto exit; + +/* Transition WM are not recommended by HW team for GEN9 */ +if (INTEL_GEN (dev_priv) <=9 ) + goto exit; + +/* Transition WM don't make any sense if ipc is disabled */ +if (!dev_priv->ipc_enabled) + goto exit; + +if (INTEL_GEN (dev_priv) >=10 ) + trans_min =4 ; + + trans_offset_b = trans_min + trans_amount; + trans_y_tile_min = (uint16_t )mul_round_up_u32_fixed16 (2 , + wp->y_tile_minimum); + +if (wp->y_tiled) { + res_blocks =max (wm_l0->plane_res_b, trans_y_tile_min) + + trans_offset_b; + }else { + res_blocks = wm_l0->plane_res_b + trans_offset_b; + } + + res_blocks +=1 ; + +/* WA BUG:1938466 add one block for non y-tile planes */ +if (!wp->y_tiled &&IS_CNL_REVID (dev_priv,CNL_REVID_A0 ,CNL_REVID_A0 )) + res_blocks +=1 ; + +if (res_blocks < ddb_allocation) { + trans_wm->plane_res_b = res_blocks; + trans_wm->plane_en = true;return ; + } -/* Until we know more, just disable transition WMs */ +exit: trans_wm->plane_en = false; }
@@ -4611,8 +4654,11 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate,to_intel_plane_state (pstate);enum plane_id plane_id =to_intel_plane (plane)->id;struct skl_wm_params wm_params; +enum pipe pipe =to_intel_crtc (cstate->base.crtc)->pipe; +uint16_t ddb_blocks; wm = &pipe_wm->planes[plane_id]; + ddb_blocks =skl_ddb_entry_size (&ddb->plane[pipe][plane_id]);memset (&wm_params,0 ,sizeof (struct skl_wm_params )); ret = skl_compute_plane_wm_params(dev_priv, cstate,
@@ -4624,7 +4670,8 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate, intel_pstate, &wm_params, wm);if (ret)return ret; -skl_compute_transition_wm (cstate, &wm->trans_wm); +skl_compute_transition_wm (cstate, &wm_params, &wm->wm[0 ], + ddb_blocks, &wm->trans_wm); } pipe_wm->linetime =skl_compute_linetime_wm (cstate);
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/11 drm/i915/glk: IPC linetime watermark workaround for GLK
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
IF IPC is enabled LINETIME_WM value should be half of calculated value
line time = ROUNDDOWN(1/2 * Calculated Line Time)
Earlier code was rounding-up the value, But updated Bspec says we should take the ROUNDDOWN. This patch corrects that as well.
--- drivers/gpu/drm/i915/intel_pm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -3
@@ -4571,9 +4571,10 @@ skl_compute_linetime_wm(struct intel_crtc_state *cstate) linetime_wm =fixed16_to_u32_round_up (mul_u32_fixed16 (8 , linetime_us)); -/* Display WA #1135: bxt. */ -if (IS_BROXTON (dev_priv) && dev_priv->ipc_enabled) - linetime_wm =DIV_ROUND_UP (linetime_wm,2 ); +/* Display WA #1135: bxt:ALL GLK:ALL */ +if ((IS_BROXTON (dev_priv) ||IS_GEMINILAKE (dev_priv)) && + dev_priv->ipc_enabled) + linetime_wm /=2 ;return linetime_wm; }
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/11 drm/i915/cnl: Extend WM workaround with IPC for CNL
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
CNL:A & CNL:B have same workaround as KBL to increase wm level latency by 4us if IPC is enabled.
--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -4447,7 +4447,8 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, }/* Display WA #1141: kbl,cfl */ -if ((IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv)) && +if ((IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv) || +IS_CNL_REVID (dev_priv,CNL_REVID_A0 ,CNL_REVID_B0 )) && dev_priv->ipc_enabled) latency +=4 ;
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/11 drm/i915/bxt: Enable IPC support
In reply to Mahesh KumarFrom: "Kumar, Mahesh" <[email protected]>
This patch adds IPC support for platforms. This patch enables IPC only for BXT/KBL platform as for SKL recommendation is to keep it disabled. IPC (Isochronous Priority Control) is the hardware feature, which dynamically controls the memory read priority of Display.
When IPC is enabled, plane read requests are sent at high priority until filling above the transition watermark, then the requests are sent at lower priority until dropping below the level 0 watermark. The lower priority requests allow other memory clients to have better memory access. When IPC is disabled, all plane read requests are sent at high priority.
Changes since V1:
- Remove commandline parameter to disable ipc
- Address Paulo's comments
Changes since V2:
- Address review comments
- Set ipc_enabled flag
Changes since V3:
- move ipc_enabled flag assignment inside intel_ipc_enable function
Changes since V4:
- Re-enable IPC after suspend/resume
Changes since V5:
- Enable IPC for all gen >=9 except SKL
--- drivers/gpu/drm/i915/i915_drv.c | 4 +++- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++++++++++ 5 files changed, 22 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
@@ -1334,7 +1334,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)intel_runtime_pm_enable (dev_priv); - dev_priv->ipc_enabled = false; +intel_enable_ipc (dev_priv);if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ))DRM_INFO ("DRM_I915_DEBUG enabled\n" );
@@ -2598,6 +2598,8 @@ static int intel_runtime_resume(struct device *kdev)if (!IS_VALLEYVIEW (dev_priv) && !IS_CHERRYVIEW (dev_priv))intel_hpd_init (dev_priv); +intel_enable_ipc (dev_priv); +enable_rpm_wakeref_asserts (dev_priv);if (ret)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6728,6 +6728,7 @@ enum {#define DISP_FBC_WM_DIS (1<<15)#define DISP_ARB_CTL2 _MMIO(0x45004)#define DISP_DATA_PARTITION_5_6 (1<<6) +#define DISP_IPC_ENABLE (1<<3)#define DBUF_CTL _MMIO(0x45008)#define DBUF_POWER_REQUEST (1<<31)#define DBUF_POWER_STATE (1<<30)
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -15723,6 +15723,7 @@ void intel_display_resume(struct drm_device *dev)if (!ret) ret =__intel_display_resume (dev, state, &ctx); +intel_enable_ipc (dev_priv);drm_modeset_drop_locks (&ctx);drm_modeset_acquire_fini (&ctx);
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -1883,6 +1883,7 @@ bool ilk_disable_lp_wm(struct drm_device *dev);int sanitize_rc6_option (struct drm_i915_private *dev_priv,int enable_rc6);int skl_check_pipe_max_pixel_rate (struct intel_crtc *intel_crtc,struct intel_crtc_state *cstate); +void intel_enable_ipc (struct drm_i915_private *dev_priv);static inline int intel_enable_rc6 (void ) {return i915.enable_rc6;
drivers/gpu/drm/i915/intel_pm.c +16 -0
@@ -5772,6 +5772,22 @@ void intel_update_watermarks(struct intel_crtc *crtc) dev_priv->display.update_wm (crtc); } +void intel_enable_ipc (struct drm_i915_private *dev_priv) +{ +u32 val; + + dev_priv->ipc_enabled = false; +if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv)) +return ; + + val =I915_READ (DISP_ARB_CTL2 ); + + val |=DISP_IPC_ENABLE ; + +I915_WRITE (DISP_ARB_CTL2 , val); + dev_priv->ipc_enabled = true; +} +/* * Lock protecting IPS related data structures */
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 11/11] drm/i915/bxt: Enable IPC support
Mahesh Kumar schreef op wo 05-07-2017 om 20:01 [+0530]:
Quoted 5 lines
From: "Kumar, Mahesh" <[email protected]>
This patch adds IPC support for platforms. This patch enables IPC only for BXT/KBL platform as for SKL recommendation is to keep it disabled.
CFL/CNL missing. ;-)
Quoted 126 lines
IPC (Isochronous Priority Control) is the hardware feature, which dynamically controls the memory read priority of Display.
When IPC is enabled, plane read requests are sent at high priority until
filling above the transition watermark, then the requests are sent at lower priority until dropping below the level 0 watermark. The lower priority requests allow other memory clients to have better memory access. When IPC is disabled, all plane read requests are sent at
high priority.Changes since V1:
- Remove commandline parameter to disable ipc
- Address Paulo's comments
Changes since V2:
- Address review comments
- Setipc_enabledflag
Changes since V3:
- moveipc_enabledflag assignment insideintel_ipc_enablefunction Changes since V4:
- Re-enable IPC after suspend/resume
Changes since V5:
- Enable IPC for all gen >=9 except SKLSigned-off-by Mahesh Kumar <[email protected]>---
drivers/gpu/drm/i915/i915_drv.c | 4 +++- drivers/gpu/drm/i915/i915_reg.h | 1 +drivers/gpu/drm/i915/intel_display.c| 1 + drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++++++++++5 files changed, 22 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -1334,7 +1334,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
intel_runtime_pm_enable(dev_priv);drivers/gpu/drm/i915/i915_drv.c +1
-1- dev_priv->ipc_enabled = false; +intel_enable_ipc (dev_priv);
if (IS_ENABLED(CONFIG_DRM_I915_DEBUG))DRM_INFO("DRM_I915_DEBUG enabled\n");drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -2598,6 +2598,8 @@ static int intel_runtime_resume(struct device *kdev) if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) intel_hpd_init(dev_priv);drivers/gpu/drm/i915/i915_drv.c +2
-0+intel_enable_ipc (dev_priv); +
enable_rpm_wakeref_asserts(dev_priv);
if (ret)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -6728,6 +6728,7 @@ enum { #define DISP_FBC_WM_DIS (1<<15) #define DISP_ARB_CTL2 _MMIO(0x45004) #define DISP_DATA_PARTITION_5_6 (1<<6) +#define DISP_IPC_ENABLE (1<<3) #define DBUF_CTL _MMIO(0x45008) #define DBUF_POWER_REQUEST (1<<31) #define DBUF_POWER_STATE (1<<30)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -15723,6 +15723,7 @@ void intel_display_resume(struct drm_device *dev) if (!ret) ret = __intel_display_resume(dev, state, &ctx);drivers/gpu/drm/i915/intel_display.c +1
-0+intel_enable_ipc (dev_priv);
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);drivers/gpu/drm/i915/intel_drv.h +0
-0@@ -1883,6 +1883,7 @@ bool ilk_disable_lp_wm(struct drm_device *dev);int
sanitize_rc6_option(struct drm_i915_private *dev_priv, int enable_rc6);
intskl_check_pipe_max_pixel_rate(struct intel_crtc *intel_crtc, struct intel_crtc_state *cstate); +voidintel_enable_ipc(struct drm_i915_private *dev_priv); static inline intintel_enable_rc6(void)
{
return i915.enable_rc6;drivers/gpu/drm/i915/intel_pm.c +0
-0@@ -5772,6 +5772,22 @@ void intel_update_watermarks(struct intel_crtc *crtc) dev_priv->display.update_wm(crtc); }drivers/gpu/drm/i915/intel_pm.c +16
-0+void intel_enable_ipc (struct drm_i915_private *dev_priv) +{ +u32 val; + + dev_priv->ipc_enabled = false; +if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv)) +return ; + + val =I915_READ (DISP_ARB_CTL2 ); + + val |=DISP_IPC_ENABLE ; + +I915_WRITE (DISP_ARB_CTL2 , val); + dev_priv->ipc_enabled = true; +} +
Quoted 3 lines
/*
* Lock protecting IPS related data structures
*/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/13 drm/i915/bxt: Enable IPC support
From: "Kumar, Mahesh" <[email protected]>
This patch adds IPC support. This patch also enables IPC in all supported platforms.
IPC (Isochronous Priority Control) is the hardware feature, which dynamically controls the memory read priority of Display.
When IPC is enabled, plane read requests are sent at high priority until filling above the transition watermark, then the requests are sent at lower priority until dropping below the level 0 watermark. The lower priority requests allow other memory clients to have better memory access. When IPC is disabled, all plane read requests are sent at high priority.
Changes since V1:
- Remove commandline parameter to disable ipc
- Address Paulo's comments
Changes since V2:
- Address review comments
- Set ipc_enabled flag
Changes since V3:
- move ipc_enabled flag assignment inside intel_ipc_enable function
Changes since V4:
- Re-enable IPC after suspend/resume
Changes since V5:
- Enable IPC for all gen >=9 except SKL
Changes since V6:
- fix commit msg
- after resume program IPC based on SW state.
--- drivers/gpu/drm/i915/i915_drv.c | 4 +++- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
@@ -1334,7 +1334,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)intel_runtime_pm_enable (dev_priv); - dev_priv->ipc_enabled = false; +intel_init_ipc (dev_priv);if (IS_ENABLED (CONFIG_DRM_I915_DEBUG ))DRM_INFO ("DRM_I915_DEBUG enabled\n" );
@@ -2598,6 +2598,8 @@ static int intel_runtime_resume(struct device *kdev)if (!IS_VALLEYVIEW (dev_priv) && !IS_CHERRYVIEW (dev_priv))intel_hpd_init (dev_priv); +intel_enable_ipc (dev_priv); +enable_rpm_wakeref_asserts (dev_priv);if (ret)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6728,6 +6728,7 @@ enum {#define DISP_FBC_WM_DIS (1<<15)#define DISP_ARB_CTL2 _MMIO(0x45004)#define DISP_DATA_PARTITION_5_6 (1<<6) +#define DISP_IPC_ENABLE (1<<3)#define DBUF_CTL _MMIO(0x45008)#define DBUF_POWER_REQUEST (1<<31)#define DBUF_POWER_STATE (1<<30)
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -15723,6 +15723,7 @@ void intel_display_resume(struct drm_device *dev)if (!ret) ret =__intel_display_resume (dev, state, &ctx); +intel_enable_ipc (dev_priv);drm_modeset_drop_locks (&ctx);drm_modeset_acquire_fini (&ctx);
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -1883,6 +1883,8 @@ bool ilk_disable_lp_wm(struct drm_device *dev);int sanitize_rc6_option (struct drm_i915_private *dev_priv,int enable_rc6);int skl_check_pipe_max_pixel_rate (struct intel_crtc *intel_crtc,struct intel_crtc_state *cstate); +void intel_init_ipc (struct drm_i915_private *dev_priv); +void intel_enable_ipc (struct drm_i915_private *dev_priv);static inline int intel_enable_rc6 (void ) {return i915.enable_rc6;
drivers/gpu/drm/i915/intel_pm.c +24 -0
@@ -5772,6 +5772,30 @@ void intel_update_watermarks(struct intel_crtc *crtc) dev_priv->display.update_wm (crtc); } +void intel_enable_ipc (struct drm_i915_private *dev_priv) +{ +u32 val; + + val =I915_READ (DISP_ARB_CTL2 ); + +if (dev_priv->ipc_enabled) + val |=DISP_IPC_ENABLE ; +else + val &= ~DISP_IPC_ENABLE ; + +I915_WRITE (DISP_ARB_CTL2 , val); +} + +void intel_init_ipc (struct drm_i915_private *dev_priv) +{ + dev_priv->ipc_enabled = false; +if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv)) +return ; + + dev_priv->ipc_enabled = true; +intel_enable_ipc (dev_priv); +} +/* * Lock protecting IPS related data structures */
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 11/13] drm/i915/bxt: Enable IPC support
Quoting Mahesh Kumar (2017-07-13 11:39:02)
Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +9
-0+void intel_enable_ipc (struct drm_i915_private *dev_priv) +{ +u32 val; + + val =I915_READ (DISP_ARB_CTL2 ); + +if (dev_priv->ipc_enabled) + val |=DISP_IPC_ENABLE ; +else
drivers/gpu/drm/i915/intel_pm.c void intel_update_watermarks(struct intel_crtc *crtc) · line 5793
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +10
-0+ val &= ~DISP_IPC_ENABLE ; + +I915_WRITE (DISP_ARB_CTL2 , val); +} + +void intel_init_ipc (struct drm_i915_private *dev_priv) +{ + dev_priv->ipc_enabled = false; +if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv)) +return ;
So dev_priv->ipc_enabled is just a dev_priv->info.has_ipc, its state never changes at runtime? Using a intel_device_info field then has a few useful side-effects including automatic printing in the lists of capabilities.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 11/13] drm/i915/bxt: Enable IPC support
Hi,
Quoted 14 lines · Chris Wilson
Quoting Mahesh Kumar (2017-07-13 11:39:02)
Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +13
-0+void intel_enable_ipc (struct drm_i915_private *dev_priv) +{ +u32 val; + + val =I915_READ (DISP_ARB_CTL2 ); + +if (dev_priv->ipc_enabled) + val |=DISP_IPC_ENABLE ; +else + val &= ~DISP_IPC_ENABLE ; + +I915_WRITE (DISP_ARB_CTL2 , val); +}
Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c void intel_update_watermarks(struct intel_crtc *crtc) · line 5793
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +6
-0+ +void intel_init_ipc (struct drm_i915_private *dev_priv) +{ + dev_priv->ipc_enabled = false; +if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv)) +return ;So
dev_priv->ipc_enabledis just adev_priv->info.has_ipc, its state never changes at runtime?
For debug purpose we may want to disable ipc, So no, it's value (dev_priv->ipc_enabled) will not be a fixed value. I have a plan to make a debugfs entry to change the IPC value at runtime.
But having it also in dev_priv->info.has_ipc a good idea, It will make condition check easy. I'll float another patch incorporating this change.
thanks,
-Mahesh
Quoted 4 lines
Using a
intel_device_infofield then has a few
useful side-effects including automatic printing in the lists of capabilities.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Fixed16.16 wrapper cleanup & wm optimization (rev4)
In reply to Mahesh Kumar== Series Details ==
== Series Details ==
Series: Fixed16.16 wrapper cleanup & wm optimization (rev4)
URL : https://patchwork.freedesktop.org/series/25692/
State : success
== Summary ==
Series 25692v4 Fixed16.16 wrapper cleanup & wm optimization
https://patchwork.freedesktop.org/api/1.0/series/25692/revisions/4/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125
Test kms_busy:
Subgroup basic-flip-default-b:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#101144
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101597 +1fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:441s fi-bdw-gvtdvm total:279 pass:257 dwarn:8 dfail:0 fail:0 skip:14 time:437s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:359s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:536s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:509s fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:490s fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:482s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:595s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:435s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:416s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:421s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:495s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:474s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:462s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:568s fi-kbl-r total:279 pass:260 dwarn:1 dfail:0 fail:0 skip:18 time:575s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:559s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:466s fi-skl-6700hq total:279 pass:262 dwarn:0 dfail:0 fail:0 skip:17 time:586s fi-skl-6700k total:279 pass:257 dwarn:4 dfail:0 fail:0 skip:18 time:467s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:475s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:432s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:542s fi-snb-2600 total:279 pass:249 dwarn:0 dfail:0 fail:1 skip:29 time:408s
24346e831017070c18f3c33b74a7b098682e20f7 drm-tip: 2017y-07m-04d-15h-39m-34s UTC integration manifest daac326 drm/i915/bxt: Enable IPC support
65b704b drm/i915/cnl: Extend WM workaround with IPC for CNL
4886878 drm/i915/glk: IPC linetime watermark workaround for GLK
a949ae6 drm/i915/gen10: Calculate and enable transition WM
0c15a17 drm/i915/skl+: Optimize WM calculation
c3408c8 drm/i915/skl+: unify cpp value in WM calculation
dc5dba9 drm/i915/skl+: WM calculation don't require height
3bfc82e drm/i915: Addition wrapper for fixed16.16 operation
9ff8463 drm/i915: cleanup fixed-point wrappers naming
404e12f drm/i915: Always perform internal fixed16 division in 64 bits
ad17d2e drm/i915: take-out common clamping code of fixed16 wrappers
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5115/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx