[Intel-gfx] [PATCH RESEND v4 6/6] drm/i915: Set PWM divider to match desired frequency in vbt

2017-04-18 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to match that frequency as close as possible. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.

[Intel-gfx] [PATCH RESEND v4 4/6] drm/i915: Store brightness level in aux backlight driver

2017-04-18 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch stores last brightness level before turning off and set them back when panel is turning on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH RESEND v4 1/6] drm/i915: Add DPCD preferred mode for backlight control

2017-04-18 Thread Puthikorn Voravootivat
-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 6 ++--- drivers/gpu/drm/i915/i915_params.h| 2 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 33 +++ 3 files changed, 27 insertions(+), 14 deletions(-)

[Intel-gfx] [PATCH RESEND v4 2/6] drm/i915: Correctly enable blacklight adjustment via DPCD

2017-04-18 Thread Puthikorn Voravootivat
intel_dp_aux_enable_backlight() assumed that the register BACKLIGHT_BRIGHTNESS_CONTROL_MODE can only has value 01 (DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET) when initialize. This patch fixed that by handling all cases of that register. Signed-off-by: Puthikorn Voravootivat <put...@chromium.

[Intel-gfx] [PATCH RESEND v4 5/6] drm: Add definition for eDP backlight frequency

2017-04-18 Thread Puthikorn Voravootivat
This patch adds the following definition - Bit mask for EDP_PWMGEN_BIT_COUNT and min/max cap register which only use bit 0:4 - Base frequency (27 MHz) for backlight PWM frequency generator. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- include/drm/drm_dp_helper.h | 2

[Intel-gfx] [PATCH RESEND v4 3/6] drm/i915: Support dynamic backlight via DPCD register

2017-04-18 Thread Puthikorn Voravootivat
This patch enables dynamic backlight by default for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH RESEND v4 0/6] Enhancement to intel_dp_aux_backlight driver

2017-04-18 Thread Puthikorn Voravootivat
last brightness level after turning display off and on. - Last two patches set the PWM freqency to match data in panel vbt. Change log: v2: - Drop PWM frequency patch - Addess suggestion from Jani Nikula v3: - Add new implementation of PWM frequency patch v4: - Rebase / minor typo fix. Puthikorn

Re: [Intel-gfx] [PATCH v4 0/6] Enhancement to intel_dp_aux_backlight driver

2017-03-29 Thread Puthikorn Voravootivat
Friendly ping. Can anyone please review this? Thanks On Wed, Mar 22, 2017 at 3:54 PM, Puthikorn Voravootivat <put...@chromium.org > wrote: > Rebase since this is not applied cleanly now. > > This patch set contain 6 patches. > - First two patches allow enable DPCD backlight

[Intel-gfx] [PATCH v4 4/6] drm/i915: Store brightness level in aux backlight driver

2017-03-22 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch stores last brightness level before turning off and set them back when panel is turning on. Cc: Jani Nikula <jani.nik...@linux.intel.com> Signed-off-by: Puthikorn Voravootivat <put...@chr

[Intel-gfx] [PATCH v4 0/6] Enhancement to intel_dp_aux_backlight driver

2017-03-22 Thread Puthikorn Voravootivat
last brightness level after turning display off and on. - Last two patches set the PWM freqency to match data in panel vbt. Change log: v2: - Drop PWM frequency patch - Addess suggestion from Jani Nikula v3: - Add new implementation of PWM frequency patch v4: - Rebase / minor typo fix. Puthikorn

[Intel-gfx] [PATCH v4 1/6] drm/i915: Add DPCD preferred mode for backlight control

2017-03-22 Thread Puthikorn Voravootivat
<jani.nik...@linux.intel.com> Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 6 ++--- drivers/gpu/drm/i915/i915_params.h| 2 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 33 +++-

[Intel-gfx] [PATCH v4 2/6] drm/i915: Correctly enable blacklight adjustment via DPCD

2017-03-22 Thread Puthikorn Voravootivat
ed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 29 +-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH v4 6/6] drm/i915: Set PWM divider to match desired frequency in vbt

2017-03-22 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to match that frequency as close as possible. Cc: Jani Nikula <jani.nik...@linux.intel.com> Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/

[Intel-gfx] [PATCH v4 3/6] drm/i915: Support dynamic backlight via DPCD register

2017-03-22 Thread Puthikorn Voravootivat
This patch enables dynamic backlight by default for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness. Cc: Jani Nikula <jani.nik...@linux.intel.com> Signed-off-by: Puthikorn Voravootivat <put...@chr

[Intel-gfx] [PATCH v4 5/6] drm: Add definition for eDP backlight frequency

2017-03-22 Thread Puthikorn Voravootivat
This patch adds the following definition - Bit mask for EDP_PWMGEN_BIT_COUNT and min/max cap register which only use bit 0:4 - Base frequency (27 MHz) for backlight PWM frequency generator. Cc: Jani Nikula <jani.nik...@linux.intel.com> Signed-off-by: Puthikorn Voravootiva

[Intel-gfx] [PATCH v3 2/6] drm/i915: Correctly enable blacklight adjustment via DPCD

2017-03-15 Thread Puthikorn Voravootivat
intel_dp_aux_enable_backlight() assumed that the register BACKLIGHT_BRIGHTNESS_CONTROL_MODE can only has value 01 (DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET) when initialize. This patch fixed that by handling all cases of that register. Signed-off-by: Puthikorn Voravootivat <put...@chromium.

[Intel-gfx] [PATCH v3 0/6] Enchancement to intel_dp_aux_backlight driver

2017-03-15 Thread Puthikorn Voravootivat
From: Puthikorn Voravootivat <put...@google.com> This patch set contain 6 patches. - First two patches allow enable DPCD backlight control when panel can also do that via PWM pin and fix the usage of enable register. - Next patch adds enable DBC by default - Next patch makes the driver r

[Intel-gfx] [PATCH v3 1/6] drm/i915: Add DPCD prefered mode for backlight control

2017-03-15 Thread Puthikorn Voravootivat
-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 6 ++--- drivers/gpu/drm/i915/i915_params.h| 2 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 33 +++ 3 files changed, 27 insertions(+), 14 deletions(-)

[Intel-gfx] [PATCH v3 5/6] drm: Add definition for eDP backlight frequency

2017-03-15 Thread Puthikorn Voravootivat
This patch adds the following definition - Bit mask for EDP_PWMGEN_BIT_COUNT and min/max cap register which only use bit 0:4 - Base frequency (27 MHz) for backlight PWM frequency generator. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- include/drm/drm_dp_helper.h | 2

[Intel-gfx] [PATCH v3 3/6] drm/i915: Support dynamic backlight via DPCD register

2017-03-15 Thread Puthikorn Voravootivat
This patch enables dynamic backlight by default for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH v3 0/6] Enchancement to intel_dp_aux_backlight driver

2017-03-15 Thread Puthikorn Voravootivat
From: Puthikorn Voravootivat <put...@google.com> This patch set contain 6 patches. - First two patches allow enable DPCD backlight control when panel can also do that via PWM pin and fix the usage of enable register. - Next patch adds enable DBC by default - Next patch makes the driver r

[Intel-gfx] [PATCH v3 6/6] drm/i915: Set PWM divider to match desired frequency in vbt

2017-03-15 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to match that frequency as close as possible. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.

[Intel-gfx] [PATCH v3 4/6] drm/i915: Store brightness level in aux backlight driver

2017-03-15 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch stores last brightness level before turning off and set them back when panel is turning on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH v2 0/4] Enhancement to intel_dp_aux_backlight driver

2017-03-10 Thread Puthikorn Voravootivat
and on. Change log: v2: - Drop PWM frequency patch - Addess suggestion from Jani Nikula Puthikorn Voravootivat (4): drm/i915: Add DPCD prefered mode for backlight control drm/i915: Correctly enable blacklight adjustment via DPCD drm/i915: Support dynamic backlight via DPCD register drm

[Intel-gfx] [PATCH v2 4/4] drm/i915: Store brightness level in aux backlight driver

2017-03-10 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch stores last brightness level before turning off and set them back when panel is turning on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH v2 2/4] drm/i915: Correctly enable blacklight adjustment via DPCD

2017-03-10 Thread Puthikorn Voravootivat
-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 29 +-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c

[Intel-gfx] [PATCH v2 3/4] drm/i915: Support dynamic backlight via DPCD register

2017-03-10 Thread Puthikorn Voravootivat
This patch enables dynamic backlight by default for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness. Change-Id: I7140d4e838c654b6527df38b5780ad1533848d6c Signed-off-by: Puthikorn Voravootivat <put...@chromium.

[Intel-gfx] [PATCH v2 1/4] drm/i915: Add DPCD prefered mode for backlight control

2017-03-10 Thread Puthikorn Voravootivat
-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 6 ++--- drivers/gpu/drm/i915/i915_params.h| 2 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 33 +++ 3 files changed, 27 insertions(+), 14 deletions(-)

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Use highest frequency divider for PWM

2017-03-09 Thread Puthikorn Voravootivat
Agree that your suggestion is better. I will drop this patch in the next version of the set. Thanks On Thu, Mar 9, 2017 at 2:40 AM, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Wed, 08 Mar 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: >> TCON tend to h

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Fix condition check for backlight control via DPCD

2017-03-09 Thread Puthikorn Voravootivat
wrote: > On Wed, 08 Mar 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: >> Currently the intel_dp_aux_backlight driver requires eDP panel >> to support these conditions to allow the backlight adjust via >> dpcd register. >> 1) DP

[Intel-gfx] [PATCH 4/5] drm/i915: Use highest frequency divider for PWM

2017-03-08 Thread Puthikorn Voravootivat
TCON tend to have better brightness scaling with lower PWM frequency. This patch set the divider to highest value to lower the PWM frequency. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 11 +++ 1 file chang

[Intel-gfx] [PATCH 5/5] drm/i915: Store brightness level in aux backlight driver

2017-03-08 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch stores last brightness level before turning off and set them back when panel is turning on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH 3/5] drm/i915: Support dynamic backlight via DPCD register

2017-03-08 Thread Puthikorn Voravootivat
This patch enables dynamic backlight by default for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backl

[Intel-gfx] [PATCH 0/5] Enchancement to intel_dp_aux_backlight driver

2017-03-08 Thread Puthikorn Voravootivat
display off and on. Puthikorn Voravootivat (5): drm/i915: Fix condition check for backlight control via DPCD drm/i915: Correctly enable blacklight adjustment via DPCD drm/i915: Support dynamic backlight via DPCD register drm/i915: Use highest frequency divider for PWM drm/i915: Store

[Intel-gfx] [PATCH 2/5] drm/i915: Correctly enable blacklight adjustment via DPCD

2017-03-08 Thread Puthikorn Voravootivat
intel_dp_aux_enable_backlight() assumed that the register BACKLIGHT_BRIGHTNESS_CONTROL_MODE can only has value 01 (DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET) when initialize. This patch fixed that by handling all cases of that register. Signed-off-by: Puthikorn Voravootivat <put...@chromium.

[Intel-gfx] [PATCH 1/5] drm/i915: Fix condition check for backlight control via DPCD

2017-03-08 Thread Puthikorn Voravootivat
ment can be done via BL_ENABLE eDP connector pin in the case that it does not support doing that via AUX. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --

<    1   2