drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/3 drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp.
Valleyview/Baytrail (gen7_lp) and Cherryview/Braswell (gen8_lp) are both Atom platforms like Broxton/Apollolake and Geminilake.
So let's expand this is_lp back to these platforms and create the IS_LP(dev_priv) so we can start simplifying a bit our if/else for platform lists.
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -2829,6 +2829,7 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)#define IS_GEN9 (dev_priv) (!!((dev_priv)->info.gen_mask & BIT(8)))#define IS_GEN9_LP (dev_priv) (IS_GEN9(dev_priv) && INTEL_INFO(dev_priv)->is_lp) +#define IS_LP (dev_priv) (INTEL_INFO(dev_priv)->is_lp)#define ENGINE_MASK (id) BIT(id)#define RENDER_RING ENGINE_MASK(RCS)
drivers/gpu/drm/i915/i915_pci.c +2 -0
@@ -267,6 +267,7 @@#define VLV_FEATURES \ .gen = 7, .num_pipes = 2, \ + .is_lp = 1, \ .has_psr = 1, \ .has_runtime_pm = 1, \ .has_rc6 = 1, \
@@ -326,6 +327,7 @@static const struct intel_device_info intel_cherryview_info = { .gen =8 , .num_pipes =3 , .has_hotplug =1 , + .is_lp =1 , .ring_mask =RENDER_RING |BSD_RING |BLT_RING |VEBOX_RING , .platform =INTEL_CHERRYVIEW , .has_64bit_reloc =1 ,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 2/3 drm/i915: Rename get stolen functions for LP platforms chv+
gen8 is used for both Broadwell and Cherryview but this function here is only Cherryview and all next atom LP platforms. So let's rename it to avoid confusion as suggested by Ville.
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_stolen.c +2 -2
@@ -360,7 +360,7 @@ static void gen7_get_stolen_reserved(struct drm_i915_private *dev_priv, } } -static void gen8_get_stolen_reserved (struct drm_i915_private *dev_priv, +static void chv_get_stolen_reserved (struct drm_i915_private *dev_priv,unsigned long *base,unsigned long *size) {uint32_t reg_val =I915_READ (GEN6_STOLEN_RESERVED );
@@ -459,7 +459,7 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv)bdw_get_stolen_reserved (dev_priv, &reserved_base, &reserved_size); else - gen8_get_stolen_reserved(dev_priv, &reserved_base, + chv_get_stolen_reserved(dev_priv, &reserved_base, &reserved_size);break ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915: Rename get stolen functions for LP platforms chv+
Quoted 6 lines · Rodrigo Vivi
gen8 is used for both Broadwell and Cherryview but this function here is only Cherryview and all next atom LP platforms. So let's rename it to avoid confusion as suggested by Ville.
Cc Ville Syrjälä <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_gem_stolen.c +2
-2@@ -360,7 +360,7 @@ static void gen7_get_stolen_reserved(struct drm_i915_private *dev_priv, } } -static void gen8_get_stolen_reserved (struct drm_i915_private *dev_priv, +static void chv_get_stolen_reserved (struct drm_i915_private *dev_priv,unsigned long *base,unsigned long *size) {uint32_t reg_val =I915_READ (GEN6_STOLEN_RESERVED );@@ -459,7 +459,7 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv)bdw_get_stolen_reserved (dev_priv, &reserved_base, &reserved_size); else - gen8_get_stolen_reserved(dev_priv, &reserved_base, + chv_get_stolen_reserved(dev_priv, &reserved_base, &reserved_size);break ; }Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 3/3 drm/i915: Simplify gem stolen initialization.
In reply to Rodrigo ViviLet's take usage of IS_LP to simplify the gem stolen initialization as suggest by Tvrtko.
Also assume that all new LP platforms follows the chv+ and others bdw+.
Broxton and Geminilake were probably using the incorrect path so far.
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_gem_stolen.c +4 -5
@@ -454,13 +454,12 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv) &reserved_size);break ;default : -if (IS_BROADWELL (dev_priv) || -IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) -bdw_get_stolen_reserved (dev_priv, &reserved_base, +if (IS_LP (dev_priv)) +chv_get_stolen_reserved (dev_priv, &reserved_base, &reserved_size);else -chv_get_stolen_reserved (dev_priv, &reserved_base, - &reserved_size); +bdw_get_stolen_reserved (dev_priv, &reserved_base, + &reserved_size);break ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Simplify gem stolen initialization.
Quoted 8 lines · Rodrigo Vivi
Let's take usage of
IS_LPto simplify the gem stolen initialization as suggest by Tvrtko.Also assume that all new LP platforms follows the chv+ and others bdw+.
Broxton and Geminilake were probably using the incorrect path so far.
This patch doesn't change the path for bxt or glk, they will still use chv_get_stolen_reserved(), which is correct. It does make things clearer though, so with the above note removed, you can apply
to the whole series.
Ander
Quoted 31 lines
Cc Ander Conselvan de Oliveira <[email protected]>Cc Imre Deak <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>---
drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++-----1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_gem_stolen.c +0
-0@@ -454,13 +454,12 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv) &reserved_size); break;default:
drivers/gpu/drm/i915/i915_gem_stolen.c +2
-3-if (IS_BROADWELL (dev_priv) || - IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) - bdw_get_stolen_reserved(dev_priv, &reserved_base, +if (IS_LP (dev_priv)) + chv_get_stolen_reserved(dev_priv, &reserved_base,
&reserved_size); elsedrivers/gpu/drm/i915/i915_gem_stolen.c +2
-2-chv_get_stolen_reserved (dev_priv, &reserved_base, - &reserved_size); +bdw_get_stolen_reserved (dev_priv, &reserved_base, + &reserved_size);
Quoted 3 lines
break;
}
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: Simplify gem stolen initialization.
Let's take usage of IS_LP to simplify the gem stolen initialization as suggest by Tvrtko.
Also assume that all new LP platforms follows the chv+ and others bdw+.
v2: Remove the wrong commit message about bxt and glk. (Ander)
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_gem_stolen.c +4 -5
@@ -454,13 +454,12 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv) &reserved_size);break ;default : -if (IS_BROADWELL (dev_priv) || -IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) -bdw_get_stolen_reserved (dev_priv, &reserved_base, +if (IS_LP (dev_priv)) +chv_get_stolen_reserved (dev_priv, &reserved_base, &reserved_size);else -chv_get_stolen_reserved (dev_priv, &reserved_base, - &reserved_size); +bdw_get_stolen_reserved (dev_priv, &reserved_base, + &reserved_size);break ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Simplify gem stolen initialization.
In reply to Rodrigo ViviQuoted 6 lines · Rodrigo Vivi
Let's take usage of
IS_LPto simplify the gem stolen initialization as suggest by Tvrtko.Also assume that all new LP platforms follows the chv+ and others bdw+.
Quoted 8 lines
Broxton and Geminilake were probably using the incorrect path so far.
Cc Ander Conselvan de Oliveira <[email protected]>Cc Imre Deak <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Tvrtko Ursulin <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_gem_stolen.c +4
-5@@ -454,13 +454,12 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv) &reserved_size);break ;default : -if (IS_BROADWELL (dev_priv) || -IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) -bdw_get_stolen_reserved (dev_priv, &reserved_base, +if (IS_LP (dev_priv)) +chv_get_stolen_reserved (dev_priv, &reserved_base, &reserved_size);else -chv_get_stolen_reserved (dev_priv, &reserved_base, - &reserved_size); +bdw_get_stolen_reserved (dev_priv, &reserved_base, + &reserved_size);break ; }Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp.
URL : https://patchwork.freedesktop.org/series/16967/
State : success
== Summary ==
Series 16967v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/16967/revisions/1/mbox/
fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:247 pass:222 dwarn:0 dfail:0 fail:0 skip:25 fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-ilk-650 total:247 pass:194 dwarn:1 dfail:0 fail:0 skip:52 fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-ivb-3770 total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:247 pass:224 dwarn:3 dfail:0 fail:0 skip:20 fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32
2a932d085375c80a1bbb332799db3df9738e8eba drm-tip: 2016y-12m-18d-16h-31m-05s UTC integration manifest 6ab89fc drm/i915: Simplify gem stolen initialization.
3aa6bb7 drm/i915: Rename get stolen functions for LP platforms chv+9c49d92a drm/i915: Expand is_lp backwards to gen8_lp and gen7_lp.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3319/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Rodrigo Vivi
Valleyview/Baytrail (
gen7_lp) and Cherryview/Braswell (gen8_lp) are both Atom platforms like Broxton/Apollolake and Geminilake.So let's expand this
is_lpback to these platforms and create theIS_LP(dev_priv)so we can start simplifying a bit our if/else for platform lists.Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 2 ++ 2 files changed, 3 insertions(+)drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -2829,6 +2829,7 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)#define IS_GEN9 (dev_priv) (!!((dev_priv)->info.gen_mask & BIT(8)))#define IS_GEN9_LP (dev_priv) (IS_GEN9(dev_priv) && INTEL_INFO(dev_priv)->is_lp) +#define IS_LP (dev_priv) (INTEL_INFO(dev_priv)->is_lp)#define ENGINE_MASK (id) BIT(id)#define RENDER_RING ENGINE_MASK(RCS)drivers/gpu/drm/i915/i915_pci.c +0
-0
drivers/gpu/drm/i915/i915_pci.c line 268
Quoted 2 lines
drivers/gpu/drm/i915/i915_pci.c +0
-0@@ -267,6 +267,7 @@#define VLV_FEATURES \
Might want to inline this macro, it stopped being useful after 8d9c20e1d1e38. With or without that:
Quoted 20 lines
drivers/gpu/drm/i915/i915_pci.c +2
-0.gen = 7, .num_pipes = 2, \ + .is_lp = 1, \ .has_psr = 1, \ .has_runtime_pm = 1, \ .has_rc6 = 1, \@@ -326,6 +327,7 @@static const struct intel_device_info intel_cherryview_info = { .gen =8 , .num_pipes =3 , .has_hotplug =1 , + .is_lp =1 , .ring_mask =RENDER_RING |BSD_RING |BLT_RING |VEBOX_RING , .platform =INTEL_CHERRYVIEW , .has_64bit_reloc =1 ,Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx