From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] drm/i915: drop code duplication in favor of asle interrupt handler
Date: Wed, 24 Apr 2013 22:34:55 +0300 [thread overview]
Message-ID: <87mwsnoh7k.fsf@intel.com> (raw)
In-Reply-To: <dd7c3f9d456a4da3103f2b01823cd91c91388d56.1366830005.git.jani.nikula@intel.com>
This was supposed to be in-reply-to [1] but I screwed up.
Jani.
[1] http://mid.gmane.org/20130424182351.GB3171@strange.amr.corp.intel.com
On Wed, 24 Apr 2013, Jani Nikula <jani.nikula@intel.com> wrote:
> With the previous work asle and gse interrupt handlers should now be
> functionally the same. Drop the duplicated code.
>
> v2: Drop intel_opregion_gse_intr() also in the !CONFIG_ACPI path. (Damien)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 2 --
> drivers/gpu/drm/i915/i915_irq.c | 4 ++--
> drivers/gpu/drm/i915/intel_opregion.c | 37 ---------------------------------
> 3 files changed, 2 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 95a3cc3..b5f33ff 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1820,13 +1820,11 @@ extern int intel_opregion_setup(struct drm_device *dev);
> extern void intel_opregion_init(struct drm_device *dev);
> extern void intel_opregion_fini(struct drm_device *dev);
> extern void intel_opregion_asle_intr(struct drm_device *dev);
> -extern void intel_opregion_gse_intr(struct drm_device *dev);
> extern void intel_opregion_enable_asle(struct drm_device *dev);
> #else
> static inline void intel_opregion_init(struct drm_device *dev) { return; }
> static inline void intel_opregion_fini(struct drm_device *dev) { return; }
> static inline void intel_opregion_asle_intr(struct drm_device *dev) { return; }
> -static inline void intel_opregion_gse_intr(struct drm_device *dev) { return; }
> static inline void intel_opregion_enable_asle(struct drm_device *dev) { return; }
> #endif
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 3cf646c..125b45a 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1205,7 +1205,7 @@ static irqreturn_t ivybridge_irq_handler(int irq, void *arg)
> dp_aux_irq_handler(dev);
>
> if (de_iir & DE_GSE_IVB)
> - intel_opregion_gse_intr(dev);
> + intel_opregion_asle_intr(dev);
>
> for (i = 0; i < 3; i++) {
> if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i)))
> @@ -1302,7 +1302,7 @@ static irqreturn_t ironlake_irq_handler(int irq, void *arg)
> dp_aux_irq_handler(dev);
>
> if (de_iir & DE_GSE)
> - intel_opregion_gse_intr(dev);
> + intel_opregion_asle_intr(dev);
>
> if (de_iir & DE_PIPEA_VBLANK)
> drm_handle_vblank(dev, 0);
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index c3a288e..3e22cea 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -224,43 +224,6 @@ void intel_opregion_asle_intr(struct drm_device *dev)
> iowrite32(asle_stat, &asle->aslc);
> }
>
> -void intel_opregion_gse_intr(struct drm_device *dev)
> -{
> - struct drm_i915_private *dev_priv = dev->dev_private;
> - struct opregion_asle __iomem *asle = dev_priv->opregion.asle;
> - u32 asle_stat = 0;
> - u32 asle_req;
> -
> - if (!asle)
> - return;
> -
> - asle_req = ioread32(&asle->aslc) & ASLE_REQ_MSK;
> -
> - if (!asle_req) {
> - DRM_DEBUG_DRIVER("non asle set request??\n");
> - return;
> - }
> -
> - if (asle_req & ASLE_SET_ALS_ILLUM) {
> - DRM_DEBUG_DRIVER("Illum is not supported\n");
> - asle_stat |= ASLE_ALS_ILLUM_FAILED;
> - }
> -
> - if (asle_req & ASLE_SET_BACKLIGHT)
> - asle_stat |= asle_set_backlight(dev, ioread32(&asle->bclp));
> -
> - if (asle_req & ASLE_SET_PFIT) {
> - DRM_DEBUG_DRIVER("Pfit is not supported\n");
> - asle_stat |= ASLE_PFIT_FAILED;
> - }
> -
> - if (asle_req & ASLE_SET_PWM_FREQ) {
> - DRM_DEBUG_DRIVER("PWM freq is not supported\n");
> - asle_stat |= ASLE_PWM_FREQ_FAILED;
> - }
> -
> - iowrite32(asle_stat, &asle->aslc);
> -}
> #define ASLE_ALS_EN (1<<0)
> #define ASLE_BLC_EN (1<<1)
> #define ASLE_PFIT_EN (1<<2)
> --
> 1.7.10.4
next prev parent reply other threads:[~2013-04-24 19:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 12:20 [PATCH 0/3] drm/i915: opregion cleanup Jani Nikula
2013-04-12 12:20 ` [PATCH 1/3] drm/i915: don't pretend we support ASLE ALS, PFIT, or PFMB Jani Nikula
2013-04-12 12:20 ` [PATCH 2/3] drm/i915/opregion: don't pretend we did something when we didn't Jani Nikula
2013-04-12 12:20 ` [PATCH 3/3] drm/i915: drop code duplication in favor of asle interrupt handler Jani Nikula
2013-04-24 18:23 ` Damien Lespiau
[not found] ` <39ef9d9d21a2211333ce011881e240304c3baec1.1366830005.git.jani.nikula@intel.com>
2013-04-24 19:18 ` [PATCH v2 " Jani Nikula
2013-04-24 19:34 ` Jani Nikula [this message]
2013-04-25 13:09 ` Damien Lespiau
2013-04-25 13:41 ` Daniel Vetter
2013-04-24 18:24 ` [PATCH 0/3] drm/i915: opregion cleanup Damien Lespiau
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=87mwsnoh7k.fsf@intel.com \
--to=jani.nikula@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox