public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>,
	Kamal Mostafa <kamal@canonical.com>,
	intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH 15/19] drm/i915: i915.quirks_set/quirks_mask overrides dmi match
Date: Wed, 11 Sep 2013 11:21:45 +0300	[thread overview]
Message-ID: <87k3inydie.fsf@intel.com> (raw)
In-Reply-To: <1378852608-30281-16-git-send-email-rodrigo.vivi@gmail.com>

On Wed, 11 Sep 2013, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> From: Kamal Mostafa <kamal@canonical.com>
>
> Boot params quirks_set and quirks_mask allow the user to enable or
> inhibit any dmi-matched quirks, overriding the dmi match table.  Examples:
>
>   i915.quirks_set=0x2   - enables QUIRK_LVDS_SSC_DISABLE
>   i915.quirks_set=0x8   - enables QUIRK_NO_PCH_PWM_ENABLE
>   i915.quirks_mask=0x8  - disables QUIRK_NO_PCH_PWM_ENABLE
>   i915.quirks_mask=0xFF - disables all quirks

While I admit this can be used to workaround issues with certain
machines, this is a hack that exposes an implementation detail to the
userspace, and carves it into the stone. Any user of it would have to
look at the kernel source to make a smart choice of parameters; more
likely forums would start filling with tips what to set.

So NAK from me.

That said, I think we still have a few stones unturned wrt backlight and
what BIOS does in UEFI mode.


Cheers,
Jani.

>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1eabca3..12607f2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -10043,8 +10043,19 @@ static struct intel_quirk intel_quirks[] = {
>  	{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
>  };
>  
> +unsigned long i915_quirks_set __read_mostly = 0;
> +module_param_named(quirks_set, i915_quirks_set, ulong, 0600);
> +MODULE_PARM_DESC(quirks_set,
> +		"Enable specified quirks bits.");
> +
> +unsigned long i915_quirks_mask __read_mostly = 0;
> +module_param_named(quirks_mask, i915_quirks_mask, ulong, 0600);
> +MODULE_PARM_DESC(quirks_mask,
> +		"Disable specified quirks bits (override dmi match).");
> +
>  static void intel_init_quirks(struct drm_device *dev)
>  {
> +	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct pci_dev *d = dev->pdev;
>  	int i;
>  
> @@ -10062,6 +10073,10 @@ static void intel_init_quirks(struct drm_device *dev)
>  		if (dmi_check_system(*intel_dmi_quirks[i].dmi_id_list) != 0)
>  			intel_dmi_quirks[i].hook(dev);
>  	}
> +
> +	/* handle user-specified quirks overrides */
> +	dev_priv->quirks |= i915_quirks_set;
> +	dev_priv->quirks &= ~i915_quirks_mask;
>  }
>  
>  /* Disable the VGA plane that we never use */
> -- 
> 1.8.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2013-09-11  8:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 22:36 [PATCH 00/19] drm-intel-collector push simple patches for review Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 01/19] drm/i915: check that the i965g/gm 4G limit is really obeyed Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 02/19] drm/i915: Cancel outstanding modeset workers before suspend Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 03/19] drm/i915: Move the conditional seqno query into the tracepoint Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 04/19] drm/i915: Add some missing steps to i915_driver_load error path Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 05/19] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 06/19] drm/i915: Align tiled scanouts from stolen memory to 256k in the GTT Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 07/19] drm/i915: Pair seqno completion tracepoint with its dispatch Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 08/19] drm/i915: write D_COMP using the mailbox Rodrigo Vivi
2013-09-19  9:58   ` Damien Lespiau
2013-09-19 12:11     ` Daniel Vetter
2013-09-10 22:36 ` [PATCH 09/19] drm/i915: Initialise min/max frequencies before updating RPS registers Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 10/19] drm/i915: Delay the relase of the forcewake by a jiffie Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 11/19] drm/i915: Add a tracepoint for using a semaphore Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 12/19] drm/i915: Write RING_TAIL once per-request Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 13/19] drm/i915: Boost RPS frequency for CPU stalls Rodrigo Vivi
2013-09-10 22:53   ` Chris Wilson
2013-09-10 22:36 ` [PATCH 14/19] drm/i915: Tweak RPS thresholds to more aggressively downclock Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 15/19] drm/i915: i915.quirks_set/quirks_mask overrides dmi match Rodrigo Vivi
2013-09-11  8:21   ` Jani Nikula [this message]
2013-09-17 16:42     ` [Intel-gfx] " Kamal Mostafa
2013-09-19 12:10       ` Jani Nikula
2013-09-10 22:36 ` [PATCH 16/19] drm/i915: Fix l3 parity buffer offset Rodrigo Vivi
2013-09-11 11:45   ` Ville Syrjälä
2013-09-11 17:07     ` Ben Widawsky
2013-09-11 17:44       ` Ville Syrjälä
2013-09-11 17:59         ` Ben Widawsky
2013-09-10 22:36 ` [PATCH 17/19] drm/i915: Fix HSW parity test Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 18/19] drm/i915: Allow GT3 Slice Shutdown on Boot Rodrigo Vivi
2013-09-10 22:36 ` [PATCH 19/19] drm/i915: Allow Dynamically GT3 Slice Shutdown Rodrigo Vivi

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=87k3inydie.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kamal@canonical.com \
    --cc=rodrigo.vivi@gmail.com \
    --cc=stable@vger.kernel.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