All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt 1/2] lib/kms: Add a way to override an output's mode
Date: Wed, 11 Mar 2015 13:26:45 +0000	[thread overview]
Message-ID: <20150311132645.GA17209@strange.ger.corp.intel.com> (raw)
In-Reply-To: <1426073581-30504-1-git-send-email-ander.conselvan.de.oliveira@intel.com>

On Wed, Mar 11, 2015 at 01:33:00PM +0200, Ander Conselvan de Oliveira wrote:
> So that it is possible to use a custom mode with the simplified mode set API.

Maybe just igt_output_set_mode()?

-- 
Damien

> ---
>  lib/igt_kms.c | 9 +++++++++
>  lib/igt_kms.h | 4 ++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 26e4913..0dccd2d 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -895,6 +895,9 @@ static void igt_output_refresh(igt_output_t *output)
>  	if (!output->valid)
>  		return;
>  
> +	if (output->use_override_mode)
> +		output->config.default_mode = output->override_mode;
> +
>  	if (!output->name) {
>  		drmModeConnector *c = output->config.connector;
>  
> @@ -1797,6 +1800,12 @@ drmModeModeInfo *igt_output_get_mode(igt_output_t *output)
>  	return &output->config.default_mode;
>  }
>  
> +void igt_output_override_mode(igt_output_t *output, drmModeModeInfo *mode)
> +{
> +	output->override_mode = *mode;
> +	output->use_override_mode = true;
> +}
> +
>  void igt_output_set_pipe(igt_output_t *output, enum pipe pipe)
>  {
>  	igt_display_t *display = output->display;
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 2fab30e..ddf4432 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -228,6 +228,9 @@ typedef struct {
>  	bool valid;
>  	unsigned long pending_crtc_idx_mask;
>  
> +	bool use_override_mode;
> +	drmModeModeInfo override_mode;
> +
>  #ifdef HAVE_ATOMIC
>  	/* Property set for nuclear pageflip */
>  	drmModePropertySetPtr set;
> @@ -255,6 +258,7 @@ int  igt_display_get_n_pipes(igt_display_t *display);
>  
>  const char *igt_output_name(igt_output_t *output);
>  drmModeModeInfo *igt_output_get_mode(igt_output_t *output);
> +void igt_output_override_mode(igt_output_t *output, drmModeModeInfo *mode);
>  void igt_output_set_pipe(igt_output_t *output, enum pipe pipe);
>  igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane plane);
>  
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-03-11 13:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  8:59 [PATCH] drm/i915: Ignore pipe B active state when enabling pipe C Ander Conselvan de Oliveira
2015-03-09  9:24 ` Jani Nikula
2015-03-09  9:33   ` Ander Conselvan De Oliveira
2015-03-09 16:21     ` Daniel Vetter
2015-03-10 12:32       ` [PATCH] drm/i915: Simplify the way BC bifurcation state consistency is kept Ander Conselvan de Oliveira
2015-03-10 12:35         ` [PATCH] tests: Add test for pipe B and C interactions in IVB Ander Conselvan de Oliveira
2015-03-10 19:05           ` Daniel Vetter
2015-03-11 11:33             ` [PATCH igt 1/2] lib/kms: Add a way to override an output's mode Ander Conselvan de Oliveira
2015-03-11 11:33               ` [PATCH igt 2/2] tests: Add test for pipe B and C interactions in IVB Ander Conselvan de Oliveira
2015-03-27 13:35                 ` Thomas Wood
2015-03-11 13:26               ` Damien Lespiau [this message]
2015-03-11 13:48                 ` [PATCH igt 1/2] lib/kms: Add a way to override an output's mode Ander Conselvan De Oliveira
2015-03-11 14:26                   ` Damien Lespiau
2015-03-27 13:30               ` Thomas Wood
2015-03-10 13:03         ` [PATCH] drm/i915: Simplify the way BC bifurcation state consistency is kept Ville Syrjälä
2015-03-10 19:14           ` Daniel Vetter
2015-03-11 11:35             ` Ander Conselvan de Oliveira
2015-03-11 11:37               ` Conselvan De Oliveira, Ander
2015-03-11 16:58                 ` Ville Syrjälä
2015-03-11 20:42                   ` Daniel Vetter
2015-03-11 12:24               ` Ville Syrjälä
2015-03-11 13:10               ` Ville Syrjälä
2015-03-11 13:23                 ` Conselvan De Oliveira, Ander
2015-03-11 20:12               ` shuang.he
2015-03-10 19:10         ` Daniel Vetter
2015-03-10 20:40         ` shuang.he
2015-03-09 12:17 ` [PATCH] drm/i915: Ignore pipe B active state when enabling pipe C shuang.he

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=20150311132645.GA17209@strange.ger.corp.intel.com \
    --to=damien.lespiau@intel.com \
    --cc=ander.conselvan.de.oliveira@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 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.