From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add breadcrumbs for why the backlight is being set
Date: Mon, 14 Oct 2013 10:42:37 +0300 [thread overview]
Message-ID: <87y55w70ya.fsf@intel.com> (raw)
In-Reply-To: <1381665391-20083-1-git-send-email-chris@chris-wilson.co.uk>
On Sun, 13 Oct 2013, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> At the moment we have 3 paths that lead to actually_set_backlight(),
> from modesetting, ACPI/OpRegion requests and our very own
> intel_backlight interface, and we have no way of distinguishing them in
> the debug log. So add a debug breadcrumb to explain the source of the
> backlight changes.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_opregion.c | 1 +
> drivers/gpu/drm/i915/intel_panel.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index 2acf5cae20e4..564da613b278 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -405,6 +405,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
> if (bclp > 255)
> return ASLC_BACKLIGHT_FAILED;
>
> + DRM_DEBUG_KMS("updating opregion backlight %d/255\n", bclp);
Just a few lines earliner we have:
DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp);
Other than that,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> intel_panel_set_backlight(dev, bclp, 255);
> iowrite32(DIV_ROUND_UP(bclp * 100, 255) | ASLE_CBLV_VALID, &asle->cblv);
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index 54684168de1e..1f2996031ad9 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -574,6 +574,8 @@ void intel_panel_enable_backlight(struct drm_device *dev,
> intel_pipe_to_cpu_transcoder(dev_priv, pipe);
> unsigned long flags;
>
> + DRM_DEBUG_KMS("pipe=%d\n", pipe);
> +
> spin_lock_irqsave(&dev_priv->backlight.lock, flags);
>
> if (dev_priv->backlight.level == 0) {
> @@ -680,6 +682,8 @@ intel_panel_detect(struct drm_device *dev)
> static int intel_panel_update_status(struct backlight_device *bd)
> {
> struct drm_device *dev = bl_get_data(bd);
> + DRM_DEBUG_KMS("updating intel_backlight, brightness=%d/%d\n",
> + bd->props.brightness, bd->props.max_brightness);
> intel_panel_set_backlight(dev, bd->props.brightness,
> bd->props.max_brightness);
> return 0;
> --
> 1.8.4.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-10-14 7:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-13 11:56 [PATCH] drm/i915: Add breadcrumbs for why the backlight is being set Chris Wilson
2013-10-14 7:42 ` Jani Nikula [this message]
2013-10-14 7:54 ` Chris Wilson
2013-10-14 8:06 ` Jani Nikula
2013-10-14 8:20 ` Daniel Vetter
2013-10-14 8:03 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y55w70ya.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.