drm/i915: use backlight legacy combination mode also for i945gm
Subsystems (2)
PATCH 1/1 drm/i915: use backlight legacy combination mode also for i945gm
i945gm also seems to use and need the legacy combination mode bit in BLC_PWM_CTL.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
---
My scarce gen3 specs do not say anything about bit 16 of BLC_PWM_CTL. Bits 31:17 are similar to gen2, which does have bit 16 specified as legacy mode.
Per the bug, we clearly should interpret bit 16 as legacy mode also for I945GM, but how about other gen3 hardware? Thoughts?
I'm inclined to go with this, and fix others if they are reported.
--- drivers/gpu/drm/i915/intel_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +2 -2
@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) freq /=0xff ; ctl = freq <<17 ; -if (IS_GEN2 (dev) && panel->backlight.combination_mode) +if (panel->backlight.combination_mode) ctl |=BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev) && panel->backlight.active_low_pwm) ctl |=BLM_POLARITY_PNV ;
@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector) ctl =I915_READ (BLC_PWM_CTL ); -if (IS_GEN2 (dev)) +if (IS_GEN2 (dev) ||IS_I945GM (dev)) panel->backlight.combination_mode = ctl &BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev))
Signature · 1 line
1.7.9.5
Quoted 4 lines · Jani Nikula
i945gm also seems to use and need the legacy combination mode bit in
BLC_PWM_CTL.Reported-and-tested-by Luis Ortega <[email protected]>
Quoted 8 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
Signed-off-by Jani Nikula <[email protected]>---
My scarce gen3 specs do not say anything about bit 16 of
BLC_PWM_CTL. Bits 31:17 are similar to gen2, which does have bit 16 specified as legacy mode.
The spec is funny. It looks like the bit just fell off by accident.
Quoted 3 lines
Per the bug, we clearly should interpret bit 16 as legacy mode also for I945GM, but how about other gen3 hardware? Thoughts?
In that case I would expect 915 to be the same as chronologically it sits between gen2 and 945. PNV might be different.
So based on that reasoning the check could be reduced to just !IS_PINEVIEW.
Quoted 35 lines
I'm inclined to go with this, and fix others if they are reported.
--- drivers/gpu/drm/i915/intel_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_panel.c +2
-2@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) freq /=0xff ; ctl = freq <<17 ; -if (IS_GEN2 (dev) && panel->backlight.combination_mode) +if (panel->backlight.combination_mode) ctl |=BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev) && panel->backlight.active_low_pwm) ctl |=BLM_POLARITY_PNV ;@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector) ctl =I915_READ (BLC_PWM_CTL ); -if (IS_GEN2 (dev)) +if (IS_GEN2 (dev) ||IS_I945GM (dev)) panel->backlight.combination_mode = ctl &BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev))Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
PATCH 1/1 drm/i915: use backlight legacy combination mode also for i915gm/i945gm
i915gm and i945gm also seem to use and need the legacy combination mode bit in BLC_PWM_CTL.
v2: Also do this for i915gm (Ville).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
--- drivers/gpu/drm/i915/intel_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +2 -2
@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) freq /=0xff ; ctl = freq <<17 ; -if (IS_GEN2 (dev) && panel->backlight.combination_mode) +if (panel->backlight.combination_mode) ctl |=BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev) && panel->backlight.active_low_pwm) ctl |=BLM_POLARITY_PNV ;
@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector) ctl =I915_READ (BLC_PWM_CTL ); -if (IS_GEN2 (dev)) +if (IS_GEN2 (dev) ||IS_I915GM (dev) ||IS_I945GM (dev)) panel->backlight.combination_mode = ctl &BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev))
Signature · 1 line
1.7.9.5
Re: [PATCH] drm/i915: use backlight legacy combination mode also for i915gm/i945gm
Quoted 8 lines · Jani Nikula
i915gm and i945gm also seem to use and need the legacy combination mode bit in
BLC_PWM_CTL.v2: Also do this for i915gm (Ville).
Reported-and-tested-by Luis Ortega <[email protected]>Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
Signed-off-by Jani Nikula <[email protected]>
Looks sane enough for me.
Quoted 28 lines
--- drivers/gpu/drm/i915/intel_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_panel.c +2
-2@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) freq /=0xff ; ctl = freq <<17 ; -if (IS_GEN2 (dev) && panel->backlight.combination_mode) +if (panel->backlight.combination_mode) ctl |=BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev) && panel->backlight.active_low_pwm) ctl |=BLM_POLARITY_PNV ;@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector) ctl =I915_READ (BLC_PWM_CTL ); -if (IS_GEN2 (dev)) +if (IS_GEN2 (dev) ||IS_I915GM (dev) ||IS_I945GM (dev)) panel->backlight.combination_mode = ctl &BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev))Signature · 1 line
1.7.9.5
Signature · 2 lines
Ville Syrjälä Intel OTC
Jani Nikula
AppliedRe: [PATCH] drm/i915: use backlight legacy combination mode also for i915gm/i945gm
Quoted 6 lines · Ville Syrjälä
Quoted 5 lines · Jani Nikula
i915gm and i945gm also seem to use and need the legacy combination mode bit in
BLC_PWM_CTL.v2: Also do this for i915gm (Ville).
Quoted 7 lines
Quoted 3 lines
Reported-and-tested-by Luis Ortega <[email protected]>Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
Signed-off-by Jani Nikula <[email protected]>Looks sane enough for me.
Reviewed-by Ville Syrjälä <[email protected]>
Pushed to -fixes, thanks for the review.
Jani.
Quoted 33 lines
Quoted 29 lines
--- drivers/gpu/drm/i915/intel_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_panel.c +2
-2@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector) freq /=0xff ; ctl = freq <<17 ; -if (IS_GEN2 (dev) && panel->backlight.combination_mode) +if (panel->backlight.combination_mode) ctl |=BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev) && panel->backlight.active_low_pwm) ctl |=BLM_POLARITY_PNV ;@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector) ctl =I915_READ (BLC_PWM_CTL ); -if (IS_GEN2 (dev)) +if (IS_GEN2 (dev) ||IS_I915GM (dev) ||IS_I945GM (dev)) panel->backlight.combination_mode = ctl &BLM_LEGACY_MODE ;if (IS_PINEVIEW (dev))Signature · 1 line
1.7.9.5Signature · 2 lines
Ville Syrjälä Intel OTC
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx