public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org, shuang.he@linux.intel.com
Subject: Re: [PATCH 3/4] drm: add drm_mode_same_size function
Date: Tue, 21 Oct 2014 16:49:37 +0200	[thread overview]
Message-ID: <20141021144937.GL26941@phenom.ffwll.local> (raw)
In-Reply-To: <1412884665-16766-3-git-send-email-jbarnes@virtuousgeek.org>

On Thu, Oct 09, 2014 at 12:57:44PM -0700, Jesse Barnes wrote:
> From: Kristian Høgsberg <hoegsberg@gmail.com>
> 
> Like mode_equal but w/o the clock checks.  Useful for checking if modes
> are close enough to re-use to avoid a boot time mode set for example.
> 
> Signed-off-by: Kristian Høgsberg <hoegsberg@gmail.com>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/drm_modes.c | 8 ++++++++
>  include/drm/drm_modes.h     | 2 ++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index d1b7d20..51ede38 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -905,6 +905,14 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
>  }
>  EXPORT_SYMBOL(drm_mode_equal_no_clocks_no_stereo);
>  

kerneldoc is missing here.
-Daniel

> +bool drm_mode_same_size(const struct drm_display_mode *mode1,
> +			const struct drm_display_mode *mode2)
> +{
> +	return mode1->vdisplay == mode2->vdisplay &&
> +		mode1->hdisplay == mode2->hdisplay;
> +}
> +EXPORT_SYMBOL(drm_mode_same_size);
> +
>  /**
>   * drm_mode_validate_size - make sure modes adhere to size constraints
>   * @dev: DRM device
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index 91d0582..7272309 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -215,6 +215,8 @@ bool drm_mode_equal(const struct drm_display_mode *mode1,
>  		    const struct drm_display_mode *mode2);
>  bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
>  					const struct drm_display_mode *mode2);
> +bool drm_mode_same_size(const struct drm_display_mode *mode1,
> +			const struct drm_display_mode *mode2);
>  
>  /* for use by the crtc helper probe functions */
>  void drm_mode_validate_size(struct drm_device *dev,
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-10-21 14:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 19:57 [PATCH 1/4] drm/i915: preserve SSC if previously set v3 Jesse Barnes
2014-10-09 19:57 ` [PATCH 2/4] drm/i915: preserve swizzle settings if necessary v4 Jesse Barnes
2014-10-21 14:49   ` Daniel Vetter
2014-10-30 21:25     ` Jesse Barnes
2014-10-09 19:57 ` [PATCH 3/4] drm: add drm_mode_same_size function Jesse Barnes
2014-10-21 14:49   ` Daniel Vetter [this message]
2014-10-22 15:40     ` Jesse Barnes
2014-10-09 19:57 ` [PATCH 4/4] drm/i915: use current mode if the size matches the preferred mode Jesse Barnes
2014-10-10 14:44   ` [PATCH 4/4] drm/i915: use current mode if the size shuang.he
2014-10-21 14:53   ` [PATCH 4/4] drm/i915: use current mode if the size matches the preferred mode Daniel Vetter
2014-10-22 15:42     ` Jesse Barnes
2014-10-23 10:23       ` Daniel Vetter
2014-11-13  8:42 ` [PATCH 1/4] drm/i915: preserve SSC if previously set v3 Jani Nikula
2014-11-14  9:36   ` 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=20141021144937.GL26941@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=shuang.he@linux.intel.com \
    /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