dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Print pwm device-name when using pwm for backlight control
@ 2017-06-23  7:42 Hans de Goede
  2017-06-27  9:52 ` Ville Syrjälä
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2017-06-23  7:42 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Ville Syrjälä
  Cc: Hans de Goede, intel-gfx, dri-devel

On Bay Trail devices either the Crystal Cove PMIC's pwm or the LPSS'
pwm is used to control the backlight. Other drivers take core of
providing a backlight_pwm alias through pwm_add_table, but it is
still useful to know which pwm device actually ends up being used
for debugging backlight issues, so add a DRM_INFO logging the
pwm device-name.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/intel_panel.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index cb50c527401f..7936a64af393 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1670,6 +1670,9 @@ static int pwm_setup_backlight(struct intel_connector *connector,
 				 CRC_PMIC_PWM_PERIOD_NS);
 	panel->backlight.enabled = panel->backlight.level != 0;
 
+	DRM_INFO("Using %s pwm-device for backlight control\n",
+		 dev_name(panel->backlight.pwm->chip->dev));
+
 	return 0;
 }
 
-- 
2.13.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Print pwm device-name when using pwm for backlight control
  2017-06-23  7:42 [PATCH] drm/i915: Print pwm device-name when using pwm for backlight control Hans de Goede
@ 2017-06-27  9:52 ` Ville Syrjälä
  2017-06-27 13:26   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2017-06-27  9:52 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Daniel Vetter, intel-gfx, dri-devel

On Fri, Jun 23, 2017 at 09:42:44AM +0200, Hans de Goede wrote:
> On Bay Trail devices either the Crystal Cove PMIC's pwm or the LPSS'
> pwm is used to control the backlight. Other drivers take core of
> providing a backlight_pwm alias through pwm_add_table, but it is
> still useful to know which pwm device actually ends up being used
> for debugging backlight issues, so add a DRM_INFO logging the
> pwm device-name.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_panel.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index cb50c527401f..7936a64af393 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -1670,6 +1670,9 @@ static int pwm_setup_backlight(struct intel_connector *connector,
>  				 CRC_PMIC_PWM_PERIOD_NS);
>  	panel->backlight.enabled = panel->backlight.level != 0;
>  
> +	DRM_INFO("Using %s pwm-device for backlight control\n",
> +		 dev_name(panel->backlight.pwm->chip->dev));

Is DRM_DEBUG_KMS() not enough?

> +
>  	return 0;
>  }
>  
> -- 
> 2.13.0

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Print pwm device-name when using pwm for backlight control
  2017-06-27  9:52 ` Ville Syrjälä
@ 2017-06-27 13:26   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2017-06-27 13:26 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Daniel Vetter, intel-gfx, dri-devel

Hi,

On 06/27/2017 11:52 AM, Ville Syrjälä wrote:
> On Fri, Jun 23, 2017 at 09:42:44AM +0200, Hans de Goede wrote:
>> On Bay Trail devices either the Crystal Cove PMIC's pwm or the LPSS'
>> pwm is used to control the backlight. Other drivers take core of
>> providing a backlight_pwm alias through pwm_add_table, but it is
>> still useful to know which pwm device actually ends up being used
>> for debugging backlight issues, so add a DRM_INFO logging the
>> pwm device-name.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   drivers/gpu/drm/i915/intel_panel.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
>> index cb50c527401f..7936a64af393 100644
>> --- a/drivers/gpu/drm/i915/intel_panel.c
>> +++ b/drivers/gpu/drm/i915/intel_panel.c
>> @@ -1670,6 +1670,9 @@ static int pwm_setup_backlight(struct intel_connector *connector,
>>   				 CRC_PMIC_PWM_PERIOD_NS);
>>   	panel->backlight.enabled = panel->backlight.level != 0;
>>   
>> +	DRM_INFO("Using %s pwm-device for backlight control\n",
>> +		 dev_name(panel->backlight.pwm->chip->dev));
> 
> Is DRM_DEBUG_KMS() not enough?

I prefer DRM_INFO so that I can just ask users with backlight issues
to do a dmesg and then see which pwm controller is being used.

Regards,

Hans
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-27 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23  7:42 [PATCH] drm/i915: Print pwm device-name when using pwm for backlight control Hans de Goede
2017-06-27  9:52 ` Ville Syrjälä
2017-06-27 13:26   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).