* [PATCH] drm/i915: Convert pxvid to extvid lookup table
@ 2014-11-27 14:23 Mika Kuoppala
2014-11-27 22:03 ` shuang.he
2014-11-28 14:55 ` Ville Syrjälä
0 siblings, 2 replies; 9+ messages in thread
From: Mika Kuoppala @ 2014-11-27 14:23 UTC (permalink / raw)
To: intel-gfx
to a procedural to save space.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 155 +++++-----------------------------------
1 file changed, 18 insertions(+), 137 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9af0af4..78911e2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5681,146 +5681,27 @@ unsigned long i915_mch_val(struct drm_i915_private *dev_priv)
return ((m * x) / 127) - b;
}
-static u16 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
+static int _pxvid_to_vd(u8 pxvid)
+{
+ if (pxvid == 0)
+ return 0;
+
+ if (pxvid >= 8 && pxvid < 31)
+ pxvid = 31;
+
+ return (pxvid + 2) * 125;
+}
+
+static u32 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
{
struct drm_device *dev = dev_priv->dev;
- static const struct v_table {
- u16 vd; /* in .1 mil */
- u16 vm; /* in .1 mil */
- } v_table[] = {
- { 0, 0, },
- { 375, 0, },
- { 500, 0, },
- { 625, 0, },
- { 750, 0, },
- { 875, 0, },
- { 1000, 0, },
- { 1125, 0, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4250, 3125, },
- { 4375, 3250, },
- { 4500, 3375, },
- { 4625, 3500, },
- { 4750, 3625, },
- { 4875, 3750, },
- { 5000, 3875, },
- { 5125, 4000, },
- { 5250, 4125, },
- { 5375, 4250, },
- { 5500, 4375, },
- { 5625, 4500, },
- { 5750, 4625, },
- { 5875, 4750, },
- { 6000, 4875, },
- { 6125, 5000, },
- { 6250, 5125, },
- { 6375, 5250, },
- { 6500, 5375, },
- { 6625, 5500, },
- { 6750, 5625, },
- { 6875, 5750, },
- { 7000, 5875, },
- { 7125, 6000, },
- { 7250, 6125, },
- { 7375, 6250, },
- { 7500, 6375, },
- { 7625, 6500, },
- { 7750, 6625, },
- { 7875, 6750, },
- { 8000, 6875, },
- { 8125, 7000, },
- { 8250, 7125, },
- { 8375, 7250, },
- { 8500, 7375, },
- { 8625, 7500, },
- { 8750, 7625, },
- { 8875, 7750, },
- { 9000, 7875, },
- { 9125, 8000, },
- { 9250, 8125, },
- { 9375, 8250, },
- { 9500, 8375, },
- { 9625, 8500, },
- { 9750, 8625, },
- { 9875, 8750, },
- { 10000, 8875, },
- { 10125, 9000, },
- { 10250, 9125, },
- { 10375, 9250, },
- { 10500, 9375, },
- { 10625, 9500, },
- { 10750, 9625, },
- { 10875, 9750, },
- { 11000, 9875, },
- { 11125, 10000, },
- { 11250, 10125, },
- { 11375, 10250, },
- { 11500, 10375, },
- { 11625, 10500, },
- { 11750, 10625, },
- { 11875, 10750, },
- { 12000, 10875, },
- { 12125, 11000, },
- { 12250, 11125, },
- { 12375, 11250, },
- { 12500, 11375, },
- { 12625, 11500, },
- { 12750, 11625, },
- { 12875, 11750, },
- { 13000, 11875, },
- { 13125, 12000, },
- { 13250, 12125, },
- { 13375, 12250, },
- { 13500, 12375, },
- { 13625, 12500, },
- { 13750, 12625, },
- { 13875, 12750, },
- { 14000, 12875, },
- { 14125, 13000, },
- { 14250, 13125, },
- { 14375, 13250, },
- { 14500, 13375, },
- { 14625, 13500, },
- { 14750, 13625, },
- { 14875, 13750, },
- { 15000, 13875, },
- { 15125, 14000, },
- { 15250, 14125, },
- { 15375, 14250, },
- { 15500, 14375, },
- { 15625, 14500, },
- { 15750, 14625, },
- { 15875, 14750, },
- { 16000, 14875, },
- { 16125, 15000, },
- };
+ const int vd = _pxvid_to_vd(pxvid);
+ const int vm = vd - 1125;
+
if (INTEL_INFO(dev)->is_mobile)
- return v_table[pxvid].vm;
- else
- return v_table[pxvid].vd;
+ return vm > 0 ? vm : 0;
+
+ return vd;
}
static void __i915_update_gfx_val(struct drm_i915_private *dev_priv)
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table
2014-11-27 14:23 [PATCH] drm/i915: Convert pxvid to extvid lookup table Mika Kuoppala
@ 2014-11-27 22:03 ` shuang.he
2014-11-28 14:55 ` Ville Syrjälä
1 sibling, 0 replies; 9+ messages in thread
From: shuang.he @ 2014-11-27 22:03 UTC (permalink / raw)
To: shuang.he, intel-gfx, mika.kuoppala
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 364/364 363/364
ILK +1-9 365/366 357/366
SNB 450/450 450/450
IVB 498/498 498/498
BYT 289/289 289/289
HSW -1 564/564 563/564
BDW 417/417 417/417
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write PASS(2, M25M23) NO_RESULT(1, M23)
*ILK igt_kms_flip_nonblocking-read PASS(2, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_nonexisting-fb DMESG_WARN(1, M26)PASS(2, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_rcs-flip-vs-panning-interruptible PASS(2, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_rcs-wf_vblank-vs-dpms-interruptible DMESG_WARN(1, M26)PASS(1, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_blocking-absolute-wf_vblank-interruptible NSPT(1, M26)PASS(1, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_plain-flip-fb-recreate-interruptible PASS(2, M26) NSPT(1, M26)
*ILK igt_kms_flip_plain-flip-ts-check-interruptible PASS(2, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_vblank-vs-hang PASS(2, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_wf_vblank-ts-check DMESG_WARN(2, M26)PASS(2, M26M37) PASS(1, M26)
ILK igt_kms_flip_wf_vblank-vs-modeset-interruptible DMESG_WARN(1, M26)PASS(2, M26) DMESG_WARN(1, M26)
*HSW igt_kms_fence_pin_leak PASS(2, M19M20) DMESG_WARN(1, M20)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table
2014-11-27 14:23 [PATCH] drm/i915: Convert pxvid to extvid lookup table Mika Kuoppala
2014-11-27 22:03 ` shuang.he
@ 2014-11-28 14:55 ` Ville Syrjälä
2014-11-28 16:22 ` Chris Wilson
1 sibling, 1 reply; 9+ messages in thread
From: Ville Syrjälä @ 2014-11-28 14:55 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Thu, Nov 27, 2014 at 04:23:12PM +0200, Mika Kuoppala wrote:
> to a procedural to save space.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 155 +++++-----------------------------------
> 1 file changed, 18 insertions(+), 137 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 9af0af4..78911e2 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5681,146 +5681,27 @@ unsigned long i915_mch_val(struct drm_i915_private *dev_priv)
> return ((m * x) / 127) - b;
> }
>
> -static u16 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
> +static int _pxvid_to_vd(u8 pxvid)
> +{
> + if (pxvid == 0)
> + return 0;
> +
> + if (pxvid >= 8 && pxvid < 31)
> + pxvid = 31;
> +
> + return (pxvid + 2) * 125;
> +}
Seems simple enough as a function. I copy pasted the stuff into a small c
program and it confirmed that we get identical values from the old and
new code. So looks good.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> +static u32 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
> {
> struct drm_device *dev = dev_priv->dev;
> - static const struct v_table {
> - u16 vd; /* in .1 mil */
> - u16 vm; /* in .1 mil */
> - } v_table[] = {
> - { 0, 0, },
> - { 375, 0, },
> - { 500, 0, },
> - { 625, 0, },
> - { 750, 0, },
> - { 875, 0, },
> - { 1000, 0, },
> - { 1125, 0, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4125, 3000, },
> - { 4250, 3125, },
> - { 4375, 3250, },
> - { 4500, 3375, },
> - { 4625, 3500, },
> - { 4750, 3625, },
> - { 4875, 3750, },
> - { 5000, 3875, },
> - { 5125, 4000, },
> - { 5250, 4125, },
> - { 5375, 4250, },
> - { 5500, 4375, },
> - { 5625, 4500, },
> - { 5750, 4625, },
> - { 5875, 4750, },
> - { 6000, 4875, },
> - { 6125, 5000, },
> - { 6250, 5125, },
> - { 6375, 5250, },
> - { 6500, 5375, },
> - { 6625, 5500, },
> - { 6750, 5625, },
> - { 6875, 5750, },
> - { 7000, 5875, },
> - { 7125, 6000, },
> - { 7250, 6125, },
> - { 7375, 6250, },
> - { 7500, 6375, },
> - { 7625, 6500, },
> - { 7750, 6625, },
> - { 7875, 6750, },
> - { 8000, 6875, },
> - { 8125, 7000, },
> - { 8250, 7125, },
> - { 8375, 7250, },
> - { 8500, 7375, },
> - { 8625, 7500, },
> - { 8750, 7625, },
> - { 8875, 7750, },
> - { 9000, 7875, },
> - { 9125, 8000, },
> - { 9250, 8125, },
> - { 9375, 8250, },
> - { 9500, 8375, },
> - { 9625, 8500, },
> - { 9750, 8625, },
> - { 9875, 8750, },
> - { 10000, 8875, },
> - { 10125, 9000, },
> - { 10250, 9125, },
> - { 10375, 9250, },
> - { 10500, 9375, },
> - { 10625, 9500, },
> - { 10750, 9625, },
> - { 10875, 9750, },
> - { 11000, 9875, },
> - { 11125, 10000, },
> - { 11250, 10125, },
> - { 11375, 10250, },
> - { 11500, 10375, },
> - { 11625, 10500, },
> - { 11750, 10625, },
> - { 11875, 10750, },
> - { 12000, 10875, },
> - { 12125, 11000, },
> - { 12250, 11125, },
> - { 12375, 11250, },
> - { 12500, 11375, },
> - { 12625, 11500, },
> - { 12750, 11625, },
> - { 12875, 11750, },
> - { 13000, 11875, },
> - { 13125, 12000, },
> - { 13250, 12125, },
> - { 13375, 12250, },
> - { 13500, 12375, },
> - { 13625, 12500, },
> - { 13750, 12625, },
> - { 13875, 12750, },
> - { 14000, 12875, },
> - { 14125, 13000, },
> - { 14250, 13125, },
> - { 14375, 13250, },
> - { 14500, 13375, },
> - { 14625, 13500, },
> - { 14750, 13625, },
> - { 14875, 13750, },
> - { 15000, 13875, },
> - { 15125, 14000, },
> - { 15250, 14125, },
> - { 15375, 14250, },
> - { 15500, 14375, },
> - { 15625, 14500, },
> - { 15750, 14625, },
> - { 15875, 14750, },
> - { 16000, 14875, },
> - { 16125, 15000, },
> - };
> + const int vd = _pxvid_to_vd(pxvid);
> + const int vm = vd - 1125;
> +
> if (INTEL_INFO(dev)->is_mobile)
> - return v_table[pxvid].vm;
> - else
> - return v_table[pxvid].vd;
> + return vm > 0 ? vm : 0;
> +
> + return vd;
> }
>
> static void __i915_update_gfx_val(struct drm_i915_private *dev_priv)
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table
2014-11-28 14:55 ` Ville Syrjälä
@ 2014-11-28 16:22 ` Chris Wilson
2014-11-28 18:18 ` Daniel Vetter
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Chris Wilson @ 2014-11-28 16:22 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Fri, Nov 28, 2014 at 04:55:11PM +0200, Ville Syrjälä wrote:
> On Thu, Nov 27, 2014 at 04:23:12PM +0200, Mika Kuoppala wrote:
> > to a procedural to save space.
I really don't like this style of changelog (run on sentences from
the subject). For the benefit of verbosity, could you measure the impact
of the change in data/txt size.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table
2014-11-28 16:22 ` Chris Wilson
@ 2014-11-28 18:18 ` Daniel Vetter
2014-12-01 9:48 ` Jani Nikula
2014-12-01 16:01 ` [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function Mika Kuoppala
2 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2014-11-28 18:18 UTC (permalink / raw)
To: Chris Wilson, Ville Syrjälä, Mika Kuoppala, intel-gfx
On Fri, Nov 28, 2014 at 04:22:05PM +0000, Chris Wilson wrote:
> On Fri, Nov 28, 2014 at 04:55:11PM +0200, Ville Syrjälä wrote:
> > On Thu, Nov 27, 2014 at 04:23:12PM +0200, Mika Kuoppala wrote:
> > > to a procedural to save space.
>
> I really don't like this style of changelog (run on sentences from
> the subject). For the benefit of verbosity, could you measure the impact
> of the change in data/txt size.
Yeah those stats would be nice to add to the commit message. Merged
meanwhile, but please follow up.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table
2014-11-28 16:22 ` Chris Wilson
2014-11-28 18:18 ` Daniel Vetter
@ 2014-12-01 9:48 ` Jani Nikula
2014-12-01 16:01 ` [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function Mika Kuoppala
2 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2014-12-01 9:48 UTC (permalink / raw)
To: Chris Wilson, Ville Syrjälä; +Cc: intel-gfx
On Fri, 28 Nov 2014, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Fri, Nov 28, 2014 at 04:55:11PM +0200, Ville Syrjälä wrote:
>> On Thu, Nov 27, 2014 at 04:23:12PM +0200, Mika Kuoppala wrote:
>> > to a procedural to save space.
>
> I really don't like this style of changelog (run on sentences from
> the subject).
Agreed. In general, the commit message should make sense on its own,
without the subject line.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function
2014-11-28 16:22 ` Chris Wilson
2014-11-28 18:18 ` Daniel Vetter
2014-12-01 9:48 ` Jani Nikula
@ 2014-12-01 16:01 ` Mika Kuoppala
2014-12-01 16:49 ` Daniel Vetter
2014-12-03 0:54 ` shuang.he
2 siblings, 2 replies; 9+ messages in thread
From: Mika Kuoppala @ 2014-12-01 16:01 UTC (permalink / raw)
To: intel-gfx
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
The conversion table can be replaced with simple enough function.
text data bss dec hex filename
839688 10987 24 850699 cfb0b drivers/gpu/drm/i915/i915.ko
839224 10987 24 850235 cf93b drivers/gpu/drm/i915/i915.ko
Result is 494 saved bytes (.05525%).
v2: - no run on sentences from subject (Chris, Jani)
- be verbose about the savings (Chris, Daniel)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 155 +++++-----------------------------------
1 file changed, 18 insertions(+), 137 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9af0af4..78911e2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5681,146 +5681,27 @@ unsigned long i915_mch_val(struct drm_i915_private *dev_priv)
return ((m * x) / 127) - b;
}
-static u16 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
+static int _pxvid_to_vd(u8 pxvid)
+{
+ if (pxvid == 0)
+ return 0;
+
+ if (pxvid >= 8 && pxvid < 31)
+ pxvid = 31;
+
+ return (pxvid + 2) * 125;
+}
+
+static u32 pvid_to_extvid(struct drm_i915_private *dev_priv, u8 pxvid)
{
struct drm_device *dev = dev_priv->dev;
- static const struct v_table {
- u16 vd; /* in .1 mil */
- u16 vm; /* in .1 mil */
- } v_table[] = {
- { 0, 0, },
- { 375, 0, },
- { 500, 0, },
- { 625, 0, },
- { 750, 0, },
- { 875, 0, },
- { 1000, 0, },
- { 1125, 0, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4125, 3000, },
- { 4250, 3125, },
- { 4375, 3250, },
- { 4500, 3375, },
- { 4625, 3500, },
- { 4750, 3625, },
- { 4875, 3750, },
- { 5000, 3875, },
- { 5125, 4000, },
- { 5250, 4125, },
- { 5375, 4250, },
- { 5500, 4375, },
- { 5625, 4500, },
- { 5750, 4625, },
- { 5875, 4750, },
- { 6000, 4875, },
- { 6125, 5000, },
- { 6250, 5125, },
- { 6375, 5250, },
- { 6500, 5375, },
- { 6625, 5500, },
- { 6750, 5625, },
- { 6875, 5750, },
- { 7000, 5875, },
- { 7125, 6000, },
- { 7250, 6125, },
- { 7375, 6250, },
- { 7500, 6375, },
- { 7625, 6500, },
- { 7750, 6625, },
- { 7875, 6750, },
- { 8000, 6875, },
- { 8125, 7000, },
- { 8250, 7125, },
- { 8375, 7250, },
- { 8500, 7375, },
- { 8625, 7500, },
- { 8750, 7625, },
- { 8875, 7750, },
- { 9000, 7875, },
- { 9125, 8000, },
- { 9250, 8125, },
- { 9375, 8250, },
- { 9500, 8375, },
- { 9625, 8500, },
- { 9750, 8625, },
- { 9875, 8750, },
- { 10000, 8875, },
- { 10125, 9000, },
- { 10250, 9125, },
- { 10375, 9250, },
- { 10500, 9375, },
- { 10625, 9500, },
- { 10750, 9625, },
- { 10875, 9750, },
- { 11000, 9875, },
- { 11125, 10000, },
- { 11250, 10125, },
- { 11375, 10250, },
- { 11500, 10375, },
- { 11625, 10500, },
- { 11750, 10625, },
- { 11875, 10750, },
- { 12000, 10875, },
- { 12125, 11000, },
- { 12250, 11125, },
- { 12375, 11250, },
- { 12500, 11375, },
- { 12625, 11500, },
- { 12750, 11625, },
- { 12875, 11750, },
- { 13000, 11875, },
- { 13125, 12000, },
- { 13250, 12125, },
- { 13375, 12250, },
- { 13500, 12375, },
- { 13625, 12500, },
- { 13750, 12625, },
- { 13875, 12750, },
- { 14000, 12875, },
- { 14125, 13000, },
- { 14250, 13125, },
- { 14375, 13250, },
- { 14500, 13375, },
- { 14625, 13500, },
- { 14750, 13625, },
- { 14875, 13750, },
- { 15000, 13875, },
- { 15125, 14000, },
- { 15250, 14125, },
- { 15375, 14250, },
- { 15500, 14375, },
- { 15625, 14500, },
- { 15750, 14625, },
- { 15875, 14750, },
- { 16000, 14875, },
- { 16125, 15000, },
- };
+ const int vd = _pxvid_to_vd(pxvid);
+ const int vm = vd - 1125;
+
if (INTEL_INFO(dev)->is_mobile)
- return v_table[pxvid].vm;
- else
- return v_table[pxvid].vd;
+ return vm > 0 ? vm : 0;
+
+ return vd;
}
static void __i915_update_gfx_val(struct drm_i915_private *dev_priv)
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function
2014-12-01 16:01 ` [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function Mika Kuoppala
@ 2014-12-01 16:49 ` Daniel Vetter
2014-12-03 0:54 ` shuang.he
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2014-12-01 16:49 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Mon, Dec 01, 2014 at 06:01:05PM +0200, Mika Kuoppala wrote:
> From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> The conversion table can be replaced with simple enough function.
>
> text data bss dec hex filename
> 839688 10987 24 850699 cfb0b drivers/gpu/drm/i915/i915.ko
> 839224 10987 24 850235 cf93b drivers/gpu/drm/i915/i915.ko
>
> Result is 494 saved bytes (.05525%).
>
> v2: - no run on sentences from subject (Chris, Jani)
> - be verbose about the savings (Chris, Daniel)
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Updated the patch, thanks for the revised commit message.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function
2014-12-01 16:01 ` [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function Mika Kuoppala
2014-12-01 16:49 ` Daniel Vetter
@ 2014-12-03 0:54 ` shuang.he
1 sibling, 0 replies; 9+ messages in thread
From: shuang.he @ 2014-12-03 0:54 UTC (permalink / raw)
To: shuang.he, intel-gfx, mika.kuoppala
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 364/364 363/364
ILK +1-9 365/366 357/366
SNB 450/450 450/450
IVB 498/498 498/498
BYT 289/289 289/289
HSW -1 564/564 563/564
BDW 417/417 417/417
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt_gem_concurrent_blit_gpu-bcs-gpu-read-after-write PASS(2, M25M23) NO_RESULT(1, M23)
*ILK igt_kms_flip_nonblocking-read PASS(2, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_nonexisting-fb DMESG_WARN(1, M26)PASS(2, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_rcs-flip-vs-panning-interruptible PASS(3, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_rcs-wf_vblank-vs-dpms-interruptible DMESG_WARN(1, M26)PASS(1, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_blocking-absolute-wf_vblank-interruptible NSPT(1, M26)PASS(2, M26) DMESG_WARN(1, M26)
*ILK igt_kms_flip_plain-flip-fb-recreate-interruptible PASS(3, M26) NSPT(1, M26)
ILK igt_kms_flip_plain-flip-ts-check-interruptible DMESG_WARN(2, M26)PASS(3, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_vblank-vs-hang DMESG_WARN(1, M26)PASS(3, M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_wf_vblank-ts-check DMESG_WARN(2, M26)PASS(10, M26M37) PASS(1, M26)
ILK igt_kms_flip_wf_vblank-vs-modeset-interruptible DMESG_WARN(2, M26)PASS(3, M26) DMESG_WARN(1, M26)
*HSW igt_kms_fence_pin_leak PASS(3, M19M20) DMESG_WARN(1, M20)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-12-03 0:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 14:23 [PATCH] drm/i915: Convert pxvid to extvid lookup table Mika Kuoppala
2014-11-27 22:03 ` shuang.he
2014-11-28 14:55 ` Ville Syrjälä
2014-11-28 16:22 ` Chris Wilson
2014-11-28 18:18 ` Daniel Vetter
2014-12-01 9:48 ` Jani Nikula
2014-12-01 16:01 ` [PATCH] drm/i915: Convert pxvid to extvid lookup table to a function Mika Kuoppala
2014-12-01 16:49 ` Daniel Vetter
2014-12-03 0:54 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox