Re: [Intel-gfx] [PATCH] i915: Introduce quirk for shifting eDP brightness.

2020-09-22 Thread Puthikorn Voravootivat
to add to the > quirk? I can follow up with Puthikorn about the relevant Chromebooks, > but I don't know what other types of laptops are using this driver. > > Thanks for your time, > Kevin Chowski > > > On Fri, Sep 18, 2020 at 12:16 PM Puthikorn Voravootivat > wrote: &g

Re: [Intel-gfx] [PATCH] i915: Introduce quirk for shifting eDP brightness.

2020-09-18 Thread Puthikorn Voravootivat
to find the set of laptops which require the lsb > quirk. I'd appreciate any advice people might have about making this > change safely. > > Thank you for your time, > Kevin > > On Thu, Sep 17, 2020 at 2:11 PM Ville Syrjälä > wrote: > > > > On Thu, Sep 17, 2020

Re: [Intel-gfx] [PATCH] i915: Introduce quirk for shifting eDP brightness.

2020-09-17 Thread Puthikorn Voravootivat
The Lyude fde7266fb2f6 change is actually based on Chromium change (https://crrev.com/c/1650325) that fixes the brightness for Samsung Galaxy Chromebook. So currently we have 2 examples that use LSB interpretation and 1 that use MSB. On Thu, Sep 17, 2020 at 10:55 AM Kevin Chowski wrote: > >

Re: [Intel-gfx] [PATCH] drm/i915/psr: vbt change for psr

2018-05-15 Thread Puthikorn Voravootivat
ultiples of 100us. > v5: Jani and Rodrigo > Handle option 2 in default condition. > Print oustide range value. > For negetive values default to 2500us. > v6: Jani > Handle default first and then fall through for case 2. > v7: Rodrigo > Apply

Re: [Intel-gfx] [PATCH] drm/i915/psr: vbt change for psr

2018-05-04 Thread Puthikorn Voravootivat
on 0x01, "100 usec"↵ > Selection 0x02, "2.5 msec"↵ > Selection 0x03, "0 (Skip)"↵ > EndList↵ > Regards, > Vathsala > -Original Message- > From: Vivi, Rodrigo > Sent: Thursday, May 3, 2018 9:15 PM > To: Nagaraju, Vathsala <vathsala.naga

Re: [Intel-gfx] [PATCH] drm/i915: Don't recheck link status for eDP display.

2017-10-17 Thread Puthikorn Voravootivat
lling > the link status. > > [1]: https://patchwork.freedesktop.org/patch/178035/ > > Thanks, > Rodrigo. > > On Tue, Oct 17, 2017 at 11:31:46PM +, Puthikorn Voravootivat wrote: >> + Vathsala for PSR related code. >> >> On Tue, Oct 17, 2017 at 4:29 PM,

Re: [Intel-gfx] [PATCH] drm/i915: Don't recheck link status for eDP display.

2017-10-17 Thread Puthikorn Voravootivat
+ Vathsala for PSR related code. On Tue, Oct 17, 2017 at 4:29 PM, Manasi Navare <manasi.d.nav...@intel.com> wrote: > On Tue, Oct 17, 2017 at 03:46:00PM -0700, Puthikorn Voravootivat wrote: >> I tried https://patchwork.freedesktop.org/series/30670/ but it doesn't work. >&

Re: [Intel-gfx] [PATCH] drm/i915: Don't recheck link status for eDP display.

2017-10-17 Thread Puthikorn Voravootivat
channel_eq_ok() will return true and no blinking occurs. On Tue, Oct 17, 2017 at 2:21 PM, Manasi Navare <manasi.d.nav...@intel.com> wrote: > On Tue, Oct 17, 2017 at 02:01:56PM -0700, Puthikorn Voravootivat wrote: >> intel_dp_long_pulse() is always checking link status because >> ther

[Intel-gfx] [PATCH] drm/i915: Don't recheck link status for eDP display.

2017-10-17 Thread Puthikorn Voravootivat
. (repro by running modetest command repeatedly) Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c

Re: [Intel-gfx] [PATCH 1/2] drm/dp: Add defines for latency in sink

2017-09-26 Thread Puthikorn Voravootivat
On Tue, Sep 26, 2017 at 10:37 AM, Puthikorn Voravootivat < put...@chromium.org> wrote: > > > On Mon, Sep 25, 2017 at 10:11 PM, Daniel Vetter <dan...@ffwll.ch> wrote: > >> On Thu, Sep 21, 2017 at 07:42:07AM -0700, Rodrigo Vivi wrote: >> > On Wed, Sep 20, 2017

Re: [Intel-gfx] [PATCH 1/2] drm/dp: Add defines for latency in sink

2017-09-26 Thread Puthikorn Voravootivat
on latency > > > in sink). > > > > > > Cc: Rodrigo Vivi <rodrigo.v...@intel.com> > > > CC: Puthikorn Voravootivat <put...@chromium.org> > > > Signed-off-by: Vathsala Nagaraju <vathsala.nagar...@intel.com> > > > > I keep f

Re: [Intel-gfx] [PATCH] drm/i915/dp: Don't invalidate intel_dp_detect result

2017-08-23 Thread Puthikorn Voravootivat
..@gmail.com> wrote: > On Wed, Aug 23, 2017 at 3:40 PM, Puthikorn Voravootivat > <put...@chromium.org> wrote: >> If the full detect is already done, we shouldn't need to do it >> again. >> >> This fixes the screen blinking issue that happen when calling >&g

[Intel-gfx] [PATCH] drm/i915/dp: Don't invalidate intel_dp_detect result

2017-08-23 Thread Puthikorn Voravootivat
If the full detect is already done, we shouldn't need to do it again. This fixes the screen blinking issue that happen when calling DRM_IOCTL_MODE_GETCONNECTOR while PSR is active. The blinking is caused by full dp detect in intel_dp_long_pulse(). Signed-off-by: Puthikorn Voravootivat <

Re: [Intel-gfx] [PATCH] drm/i915: Use AUX for backlight only if eDP 1.4 or later

2017-07-31 Thread Puthikorn Voravootivat
ake sure the AUX backlight brightness ajustment works when testing that feature. Is this make sense? Thanks. On Mon, Jul 31, 2017 at 3:55 AM, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Mon, 24 Jul 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: >> I saw a DP 1

Re: [Intel-gfx] [PATCH] drm/i915: Use AUX for backlight only if eDP 1.4 or later

2017-07-24 Thread Puthikorn Voravootivat
ignoring < eDP 1.4 panels. >> > >> > Agreed. >> > >> > This has been going on too long now, with no real effort to get at the >> > roots of >> > the problem. The right approach is to revert the regressing commits now, >> > and

Re: [Intel-gfx] [PATCH] Revert "drm/i915: Add heuristic to determine better way to adjust brightness"

2017-07-18 Thread Puthikorn Voravootivat
May be the older panel might not work well with this feature. David/Jani, what do you think about adding check that the panel is eDP 1.4 or later in the heuristic? diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index

[Intel-gfx] [PATCH v12 3/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-06-22 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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> Reviewed-by: Dhinakaran Pa

[Intel-gfx] [PATCH v12 0/3] Enhancement to intel_dp_aux_backlight driver

2017-06-22 Thread Puthikorn Voravootivat
D" - Make logic clearer for the case that both PWM pin and AUX are supported - Add more log when write to register fail - Add log when enable DBC v4: - Rebase / minor typo fix. v3: - Add new implementation of PWM frequency patch v2: - Drop PWM frequency patch - Address suggestion from Ja

[Intel-gfx] [PATCH v12 2/3] drm/i915: Add heuristic to determine better way to adjust brightness

2017-06-22 Thread Puthikorn Voravootivat
here. - Regional backlight brightness adjustment - Backlight PWM frequency set - More than 8 bits resolution of brightness level - Backlight enablement via AUX and not by BL_ENABLE pin Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinaka

[Intel-gfx] [PATCH v12 1/3] drm/i915: Set PWM divider to match desired frequency in vbt

2017-06-22 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value. Signed-off-by: Puthikorn

Re: [Intel-gfx] [PATCH RESEND v11 0/3] Enhancement to intel_dp_aux_backlight driver

2017-06-14 Thread Puthikorn Voravootivat
Friendly ping. Is this patch set good to go now? On Mon, Jun 5, 2017 at 2:56 PM, Puthikorn Voravootivat <put...@chromium.org> wrote: > This patch set contain 3 patches which are already reviewed by DK. > Another 6 patches in previous version was already merged in v7 and v9. > - F

Re: [Intel-gfx] [PATCH v2] drm/i915: Don't enable backlight at setup time.

2017-06-14 Thread Puthikorn Voravootivat
I tested this on actual system and it is working fine. On Tue, Jun 13, 2017 at 1:03 PM, Dhinakaran Pandiyan < dhinakaran.pandi...@intel.com> wrote: > Maarten and Ville noticed that we are enabling backlight via DP aux very > early in the modeset_init path via the intel_dp_aux_setup_backlight() >

[Intel-gfx] [PATCH RESEND v11 2/3] drm/i915: Add heuristic to determine better way to adjust brightness

2017-06-05 Thread Puthikorn Voravootivat
here. - Regional backlight brightness adjustment - Backlight PWM frequency set - More than 8 bits resolution of brightness level - Backlight enablement via AUX and not by BL_ENABLE pin Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinaka

[Intel-gfx] [PATCH RESEND v11 0/3] Enhancement to intel_dp_aux_backlight driver

2017-06-05 Thread Puthikorn Voravootivat
- Make logic clearer for the case that both PWM pin and AUX are supported - Add more log when write to register fail - Add log when enable DBC v4: - Rebase / minor typo fix. v3: - Add new implementation of PWM frequency patch v2: - Drop PWM frequency patch - Address suggestion from Jani Nikula Puthi

[Intel-gfx] [PATCH RESEND v11 3/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-06-05 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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> Reviewed-by: Dhinakaran Pa

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

2017-06-05 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value. Signed-off-by: Puthikorn

Re: [Intel-gfx] [PATCH v11 3/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-06-05 Thread Puthikorn Voravootivat
at 19:04 -0700, Puthikorn Voravootivat wrote: > > This patch adds option to enable dynamic backlight for eDP > > panel that supports this feature via DPCD register and > > set minimum / maximum brightness to 0% and 100% of the > > nor

[Intel-gfx] [PATCH v11 2/3] drm/i915: Add heuristic to determine better way to adjust brightness

2017-06-02 Thread Puthikorn Voravootivat
here. - Regional backlight brightness adjustment - Backlight PWM frequency set - More than 8 bits resolution of brightness level - Backlight enablement via AUX and not by BL_ENABLE pin Change-Id: If8376b09fbf83398c40037a04ddba1035c6b71fc Signed-off-by: Puthikorn Voravootivat <put...@chromium.

[Intel-gfx] [PATCH v11 3/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-06-02 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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: I52f04b814bb4cd9df570ab59094ae974b9baec5b Signed-off-by: Puthikorn Voravootivat <

[Intel-gfx] [PATCH v11 1/3] drm/i915: Set PWM divider to match desired frequency in vbt

2017-06-02 Thread Puthikorn Voravootivat
: I96221608e1288ffc03a0fd9c4a658809acda4aca Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 98 --- 1 file changed, 90 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/g

[Intel-gfx] [PATCH v11 0/3] Enhancement to intel_dp_aux_backlight driver

2017-06-02 Thread Puthikorn Voravootivat
both PWM pin and AUX are supported - Add more log when write to register fail - Add log when enable DBC v4: - Rebase / minor typo fix. v3: - Add new implementation of PWM frequency patch v2: - Drop PWM frequency patch - Address suggestion from Jani Nikula Puthikorn Voravootivat (3): drm/i915: Set

Re: [Intel-gfx] [PATCH v10 2/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-06-02 Thread Puthikorn Voravootivat
On Fri, Jun 2, 2017 at 11:25 AM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Fri, 2017-05-26 at 18:42 -0700, Puthikorn Voravootivat wrote: > > This patch adds option to enable dynamic backlight for eDP > > panel that supports this feature via DPCD

Re: [Intel-gfx] [PATCH v10 1/3] drm/i915: Add heuristic to determine better way to adjust brightness

2017-06-02 Thread Puthikorn Voravootivat
; > > On Fri, 2017-05-26 at 18:42 -0700, Puthikorn Voravootivat wrote: > > > Add heuristic to decide that AUX or PWM pin should use for > > > backlight brightness adjustment and modify i915 param description > > > to have auto, force disable, and force enable.

Re: [Intel-gfx] [PATCH v10 3/3] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-31 Thread Puthikorn Voravootivat
ake this the first patch in the next version. > > On Fri, 2017-05-26 at 18:42 -0700, Puthikorn Voravootivat wrote: > > Read desired PWM frequency from panel vbt and calculate the > > value for divider in DPCD address 0x724 and 0x728 to have > > as many bits as possible for

Re: [Intel-gfx] [PATCH v10 2/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-31 Thread Puthikorn Voravootivat
On Tue, May 30, 2017 at 9:18 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Fri, 2017-05-26 at 18:42 -0700, Puthikorn Voravootivat wrote: > > This patch adds option to enable dynamic backlight for eDP > > panel that supports this feature via DPCD

[Intel-gfx] [PATCH v10 0/3] Enhancement to intel_dp_aux_backlight driver

2017-05-26 Thread Puthikorn Voravootivat
Add log when enable DBC v4: - Rebase / minor typo fix. v3: - Add new implementation of PWM frequency patch v2: - Drop PWM frequency patch - Address suggestion from Jani Nikula Puthikorn Voravootivat (3): drm/i915: Add heuristic to determine better way to adjust brightness drm/i915: Add optio

[Intel-gfx] [PATCH v10 1/3] drm/i915: Add heuristic to determine better way to adjust brightness

2017-05-26 Thread Puthikorn Voravootivat
here. - Regional backlight brightness adjustment - Backlight PWM frequency set - More than 8 bits resolution of brightness level - Backlight enablement via AUX and not by BL_ENABLE pin Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_pa

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

2017-05-26 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value. Signed-off-by: Puthikorn

[Intel-gfx] [PATCH v10 2/3] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-26 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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/i915_pa

Re: [Intel-gfx] [PATCH v9 5/5] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-26 Thread Puthikorn Voravootivat
<jani.nik...@linux.intel.com> wrote: > On Tue, 23 May 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: > > Read desired PWM frequency from panel vbt and calculate the > > value for divider in DPCD address 0x724 and 0x728 to have > > as many bits as possible

[Intel-gfx] [PATCH v9 3/5] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-23 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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/i915_pa

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

2017-05-23 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value. Signed-off-by: Puthikorn

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

2017-05-23 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> Reviewed-by: Dhinakaran Pa

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

2017-05-23 Thread Puthikorn Voravootivat
ency patch - Address suggestion from Jani Nikula Puthikorn Voravootivat (5): drm/i915: Drop AUX backlight enable check for backlight control drm/i915: Allow choosing how to adjust brightness if both supported drm/i915: Add option to support dynamic backlight via DPCD drm: Add definiti

[Intel-gfx] [PATCH v9 1/5] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-23 Thread Puthikorn Voravootivat
. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index b87c5a

[Intel-gfx] [PATCH v9 2/5] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-23 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 8 +--- drivers/gpu/drm/i915/i915_params.h| 2 +- drive

Re: [Intel-gfx] [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-19 Thread Puthikorn Voravootivat
at 17:34 -0700, Puthikorn Voravootivat wrote: > > This patch adds option to enable dynamic backlight for eDP > > panel that supports this feature via DPCD register and > > set minimum / maximum brightness to 0% and 100% of the > > normal brightness. > > > &g

Re: [Intel-gfx] [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-17 Thread Puthikorn Voravootivat
On Wed, May 17, 2017 at 1:09 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > > ____ > From: Puthikorn Voravootivat [put...@google.com] on behalf of Puthikorn > Voravootivat [put...@chromium.org] > Sent: Tuesday,

Re: [Intel-gfx] [PATCH v7 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-16 Thread Puthikorn Voravootivat
On Tue, May 16, 2017 at 2:21 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Tue, 2017-05-16 at 13:56 -0700, Puthikorn Voravootivat wrote: > > > > > > On Tue, May 16, 2017 at 1:29 PM, Pandiyan, Dhinakaran > > <dhinakaran.pandi...@intel.com

[Intel-gfx] [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-16 Thread Puthikorn Voravootivat
. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index b87c5a381d6a..d32c06583e0b

[Intel-gfx] [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-16 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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/i915_pa

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

2017-05-16 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value. Signed-off-by: Puthikorn

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

2017-05-16 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> Reviewed-by: Dhinakaran Pa

[Intel-gfx] [PATCH v8 2/5] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-16 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 8 --- drivers/gpu/drm/i915/i915_params.h| 2 +- drivers/g

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

2017-05-16 Thread Puthikorn Voravootivat
ion from Jani Nikula Puthikorn Voravootivat (5): drm/i915: Drop AUX backlight enable check for backlight control drm/i915: Allow choosing how to adjust brightness if both supported drm/i915: Add option to support dynamic backlight via DPCD drm: Add definition for eDP backlight frequency

Re: [Intel-gfx] [PATCH v7 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-16 Thread Puthikorn Voravootivat
On Tue, May 16, 2017 at 1:29 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Tue, 2017-05-16 at 11:07 -0700, Puthikorn Voravootivat wrote: > > > > > > On Mon, May 15, 2017 at 11:21 PM, Pandiyan, Dhinakaran > > <dhinakaran.pandi...@intel.

Re: [Intel-gfx] [PATCH v7 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-16 Thread Puthikorn Voravootivat
On Mon, May 15, 2017 at 11:21 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Mon, 2017-05-15 at 17:43 -0700, Puthikorn Voravootivat wrote: > > > > > > On Mon, May 15, 2017 at 4:07 PM, Pandiyan, Dhinakaran > > <dhinakaran.pandi...@intel.

Re: [Intel-gfx] [PATCH v7 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-15 Thread Puthikorn Voravootivat
On Mon, May 15, 2017 at 4:07 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Fri, 2017-05-12 at 17:31 -0700, Puthikorn Voravootivat wrote: > > > > > > > > On Fri, May 12, 2017 at 5:12 PM, Pandiyan, Dhinakaran > > <dhinakaran.pan

Re: [Intel-gfx] [PATCH v7 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-12 Thread Puthikorn Voravootivat
On Fri, May 12, 2017 at 5:12 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Thu, 2017-05-11 at 16:02 -0700, Puthikorn Voravootivat wrote: > > Read desired PWM frequency from panel vbt and calculate the > > value for divider in DPCD address 0x

Re: [Intel-gfx] [PATCH v7 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-12 Thread Puthikorn Voravootivat
On Fri, May 12, 2017 at 6:14 AM, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Fri, 12 May 2017, "Pandiyan, Dhinakaran" <dhinakaran.pandi...@intel.com> > wrote: > > On Thu, 2017-05-11 at 16:02 -0700, Puthikorn Voravootivat wrote: > >> There ar

[Intel-gfx] [PATCH v7 6/9] drm/i915: Add option to support dynamic backlight via DPCD

2017-05-11 Thread Puthikorn Voravootivat
This patch adds option to enable dynamic backlight 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/i915_pa

[Intel-gfx] [PATCH v7 7/9] drm/i915: Restore brightness level in aux backlight driver

2017-05-11 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch restores last brightness level back when panel is turning back on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandi...@

[Intel-gfx] [PATCH v7 5/9] drm/i915: Set backlight mode before enable backlight

2017-05-11 Thread Puthikorn Voravootivat
We should set backlight mode register before set register to enable the backlight. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandi...@intel.com> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 4 ++-- 1 file changed,

[Intel-gfx] [PATCH v7 4/9] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-11 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 8 +--- drivers/gpu/drm/i915/i915_params.h| 2 +- drive

[Intel-gfx] [PATCH v7 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-11 Thread Puthikorn Voravootivat
. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index 870c03

[Intel-gfx] [PATCH v7 8/9] drm: Add definition for eDP backlight frequency

2017-05-11 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> Reviewed-by: Dhinakaran Pa

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

2017-05-11 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency is still within 25% of the desired frequency. Signed-off-by: Puthikorn

[Intel-gfx] [PATCH v7 1/9] drm/i915: Fix cap check for intel_dp_aux_backlight driver

2017-05-11 Thread Puthikorn Voravootivat
intel_dp_aux_backlight driver should check for the DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandi...@intel.com> --- drivers/gpu/drm/i915/intel_dp_aux_bac

[Intel-gfx] [PATCH v7 2/9] drm/i915: Correctly enable backlight brightness adjustment via DPCD

2017-05-11 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 v7 0/9] Enhancement to intel_dp_aux_backlight driver

2017-05-11 Thread Puthikorn Voravootivat
patch v2: - Drop PWM frequency patch - Address suggestion from Jani Nikula Puthikorn Voravootivat (9): drm/i915: Fix cap check for intel_dp_aux_backlight driver drm/i915: Correctly enable backlight brightness adjustment via DPCD drm/i915: Drop AUX backlight enable check for backlight control

Re: [Intel-gfx] [PATCH v6 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-11 Thread Puthikorn Voravootivat
On Wed, May 10, 2017 at 5:39 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Tue, 2017-05-09 at 16:40 -0700, Puthikorn Voravootivat wrote: > > There are some panel that > > (1) does not support display backlight enable via AUX > > (2) support displ

Re: [Intel-gfx] [PATCH v5 6/9] drm/i915: Support dynamic backlight via DPCD register

2017-05-11 Thread Puthikorn Voravootivat
Fair enough. Will add kernel switch in next version. On Wed, May 10, 2017 at 6:26 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Wed, 2017-05-03 at 17:28 -0700, Puthikorn Voravootivat wrote: > > This patch enables dynamic backlight by default fo

[Intel-gfx] [PATCH v6 4/9] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-09 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/i915_params.c| 8 +--- drivers/gpu/drm/i915/i915_params.h| 2 +- drive

[Intel-gfx] [PATCH v6 1/9] drm/i915: Fix cap check for intel_dp_aux_backlight driver

2017-05-09 Thread Puthikorn Voravootivat
intel_dp_aux_backlight driver should check for the DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/g

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

2017-05-09 Thread Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency is still within 25% of the desired frequency. Signed-off-by: Puthikorn

[Intel-gfx] [PATCH v6 2/9] drm/i915: Correctly enable backlight brightness adjustment via DPCD

2017-05-09 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 v6 6/9] drm/i915: Support dynamic backlight via DPCD register

2017-05-09 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 v6 0/9] Enhancement to intel_dp_aux_backlight driver

2017-05-09 Thread Puthikorn Voravootivat
v2: - Drop PWM frequency patch - Address suggestion from Jani Nikula Puthikorn Voravootivat (9): drm/i915: Fix cap check for intel_dp_aux_backlight driver drm/i915: Correctly enable backlight brightness adjustment via DPCD drm/i915: Drop AUX backlight enable check for backlight control

[Intel-gfx] [PATCH v6 7/9] drm/i915: Restore brightness level in aux backlight driver

2017-05-09 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch restores last brightness level back when panel is turning back on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandi...@

[Intel-gfx] [PATCH v6 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-09 Thread Puthikorn Voravootivat
. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index 870c03

[Intel-gfx] [PATCH v6 8/9] drm: Add definition for eDP backlight frequency

2017-05-09 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 v6 5/9] drm/i915: Set backlight mode before enable backlight

2017-05-09 Thread Puthikorn Voravootivat
We should set backlight mode register before set register to enable the backlight. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandi...@intel.com> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 4 ++-- 1 file changed,

Re: [Intel-gfx] [PATCH v5 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-09 Thread Puthikorn Voravootivat
> How is backlight enabled in this case? Using eDP BL_ENABLE pin On Sat, May 6, 2017 at 1:59 AM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Wed, 2017-05-03 at 17:28 -0700, Puthikorn Voravootivat wrote: > > There are some panel that > > (1)

Re: [Intel-gfx] [PATCH v5 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-08 Thread Puthikorn Voravootivat
:17 AM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Mon, 2017-05-08 at 10:49 -0700, Puthikorn Voravootivat wrote: > > This is not related to brightness control. This calculation is used to > > set the PWM frequency. > > Frequency = 27 Mhz / (F * 2^

Re: [Intel-gfx] [PATCH v5 1/9] drm/i915: Fix cap check for intel_dp_aux_backlight driver

2017-05-08 Thread Puthikorn Voravootivat
ndi...@intel.com> wrote: > On Wed, 2017-05-03 at 17:28 -0700, Puthikorn Voravootivat wrote: > > intel_dp_aux_backlight driver should check for the > > DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver. > > > > Signed-off-by: Puthikorn Voravootivat <put...@ch

Re: [Intel-gfx] [PATCH v5 9/9] drm/i915: Set PWM divider to match desired frequency in vbt

2017-05-08 Thread Puthikorn Voravootivat
com> wrote: > On Wed, 2017-05-03 at 17:28 -0700, Puthikorn Voravootivat wrote: > > 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. > > > > Sig

[Intel-gfx] [PATCH v6 4/9] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-05 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- Fix compile error in v5 drivers/gpu/drm/i915/i915_params.c| 8 +--- drivers/gpu/drm/i915/i915_pa

[Intel-gfx] [PATCH v5 4/9] drm/i915: Allow choosing how to adjust brightness if both supported

2017-05-03 Thread Puthikorn Voravootivat
Add option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel. 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/g

[Intel-gfx] [PATCH v5 7/9] drm/i915: Restore brightness level in aux backlight driver

2017-05-03 Thread Puthikorn Voravootivat
Some panel will default to zero brightness when turning the panel off and on again. This patch restores last brightness level back when panel is turning back on. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 + 1 file chan

[Intel-gfx] [PATCH v5 2/9] drm/i915: Correctly enable backlight brightness adjustment via DPCD

2017-05-03 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 v5 6/9] drm/i915: Support dynamic backlight via DPCD register

2017-05-03 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 v5 0/9] Enhancement to intel_dp_aux_backlight driver

2017-05-03 Thread Puthikorn Voravootivat
for "Correctly enable backlight brightness adjustment via DPCD" - Make logic clearer for the case that both PWM pin and AUX are supported - Add more log when write to register fail - Add log when enable DBC Puthikorn Voravootivat (9): drm/i915: Fix cap check for intel_dp_aux_backlight dr

[Intel-gfx] [PATCH v5 5/9] drm/i915: Set backlight mode before enable backlight

2017-05-03 Thread Puthikorn Voravootivat
We should set backlight mode register before set register to enable the backlight. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/dr

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

2017-05-03 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 v5 3/9] drm/i915: Drop AUX backlight enable check for backlight control

2017-05-03 Thread Puthikorn Voravootivat
. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index ad8560

[Intel-gfx] [PATCH v5 8/9] drm: Add definition for eDP backlight frequency

2017-05-03 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 v5 1/9] drm/i915: Fix cap check for intel_dp_aux_backlight driver

2017-05-03 Thread Puthikorn Voravootivat
intel_dp_aux_backlight driver should check for the DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver. Signed-off-by: Puthikorn Voravootivat <put...@chromium.org> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

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

2017-05-03 Thread Puthikorn Voravootivat
On Wed, May 3, 2017 at 2:11 AM, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Tue, 18 Apr 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: > > Currently the intel_dp_aux_backlight driver requires eDP panel > > to not also support backlight ad

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

2017-05-03 Thread Puthikorn Voravootivat
On Wed, May 3, 2017 at 7:12 AM, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Tue, 18 Apr 2017, Puthikorn Voravootivat <put...@chromium.org> wrote: > > Read desired PWM frequency from panel vbt and calculate the > > value for divider in DPCD addre

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

2017-05-03 Thread Puthikorn Voravootivat
On Tue, May 2, 2017 at 8:00 PM, Pandiyan, Dhinakaran < dhinakaran.pandi...@intel.com> wrote: > On Tue, 2017-04-18 at 16:48 -0700, Puthikorn Voravootivat wrote: > > This patch enables dynamic backlight by default for eDP > > panel that supports this feature via DPCD registe

  1   2   >