public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Add module param to test the load detect code
Date: Fri, 27 Mar 2015 11:57:53 +0200	[thread overview]
Message-ID: <1427450273.3664.6.camel@gmail.com> (raw)
In-Reply-To: <1425402227-13557-1-git-send-email-daniel.vetter@ffwll.ch>

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

On Tue, 2015-03-03 at 18:03 +0100, Daniel Vetter wrote:
> This is useful for writing igts to make sure we don't break this,
> without being forced to own a one of these dinosaurs.
> 
> Suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h    | 1 +
>  drivers/gpu/drm/i915/i915_params.c | 8 +++++++-
>  drivers/gpu/drm/i915/intel_crt.c   | 6 ++++--
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index e07a1cb5db67..878b16ed61b3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2429,6 +2429,7 @@ struct i915_params {
>  	bool enable_hangcheck;
>  	bool fastboot;
>  	bool prefault_disable;
> +	bool load_detect_test;
>  	bool reset;
>  	bool disable_display;
>  	bool disable_vtd_wa;
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 44f2262a5553..9f7f9a644c45 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -44,6 +44,7 @@ struct i915_params i915 __read_mostly = {
>  	.enable_ips = 1,
>  	.fastboot = 0,
>  	.prefault_disable = 0,
> +	.load_detect_test = 0,
>  	.reset = true,
>  	.invert_brightness = 0,
>  	.disable_display = 0,
> @@ -144,11 +145,16 @@ module_param_named(fastboot, i915.fastboot, bool, 0600);
>  MODULE_PARM_DESC(fastboot,
>  	"Try to skip unnecessary mode sets at boot time (default: false)");
>  
> -module_param_named(prefault_disable, i915.prefault_disable, bool, 0600);
> +module_param_named_unsafe(prefault_disable, i915.prefault_disable, bool, 0600);
>  MODULE_PARM_DESC(prefault_disable,
>  	"Disable page prefaulting for pread/pwrite/reloc (default:false). "
>  	"For developers only.");
>  
> +module_param_named_unsafe(load_detect_test, i915.load_detect_test, bool, 0600);
> +MODULE_PARM_DESC(load_detect_test,
> +	"Force-enable the VGA load detect code for testing (default:false). "
> +	"For developers only.");
> +
>  module_param_named(invert_brightness, i915.invert_brightness, int, 0600);
>  MODULE_PARM_DESC(invert_brightness,
>  	"Invert backlight brightness "
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index e66e17af0a56..b3421ac0be57 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -690,7 +690,7 @@ intel_crt_detect(struct drm_connector *connector, bool force)
>  	 * broken monitor (without edid) to work behind a broken kvm (that fails
>  	 * to have the right resistors for HP detection) needs to fix this up.
>  	 * For now just bail out. */
> -	if (I915_HAS_HOTPLUG(dev)) {
> +	if (I915_HAS_HOTPLUG(dev) && !i915.load_detect_test) {
>  		status = connector_status_disconnected;
>  		goto out;
>  	}
> @@ -706,8 +706,10 @@ intel_crt_detect(struct drm_connector *connector, bool force)
>  	if (intel_get_load_detect_pipe(connector, NULL, &tmp, &ctx)) {
>  		if (intel_crt_detect_ddc(connector))
>  			status = connector_status_connected;
> -		else
> +		else if (INTEL_INFO(dev)->gen < 4)
>  			status = intel_crt_load_detect(crt);
> +		else
> +			status = connector_status_unknown;
>  		intel_release_load_detect_pipe(connector, &tmp);
>  	} else
>  		status = connector_status_unknown;


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

      parent reply	other threads:[~2015-03-27  9:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 17:03 [PATCH] drm/i915: Add module param to test the load detect code Daniel Vetter
2015-03-03 19:23 ` Jesse Barnes
2015-03-03 21:15   ` Chris Wilson
2015-03-04  0:06     ` Daniel Vetter
2015-03-04  0:27       ` Jesse Barnes
2015-03-04  8:56         ` Chris Wilson
2015-03-04 16:09           ` Jesse Barnes
2015-03-04 16:09         ` Daniel Vetter
2015-03-04 14:29 ` shuang.he
2015-03-27  9:57 ` Ander Conselvan De Oliveira [this message]

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=1427450273.3664.6.camel@gmail.com \
    --to=conselvan2@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@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