public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	David Herrmann <dh.herrmann@gmail.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>
Subject: Re: [PATCH v3 3/3] drm/i915: Use drm_encoder_crtc_ok()
Date: Mon, 13 Jan 2014 16:19:22 +0200	[thread overview]
Message-ID: <87mwj09d79.fsf@intel.com> (raw)
In-Reply-To: <1389622077-9324-4-git-send-email-treding@nvidia.com>

On Mon, 13 Jan 2014, Thierry Reding <thierry.reding@gmail.com> wrote:
> The intel_encoder_crtc_ok() is a duplicate of the drm_encoder_crtc_ok()
> function that used to be only available in the DRM CRTC helpers. It has
> recently been moved to the core, so the duplicate can now be dropped.
>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> ---
> Changes in v3:
> - replace intel_encoder_crtc_ok() by drm_encoder_crtc_ok()
>
>  drivers/gpu/drm/i915/intel_display.c | 26 ++------------------------
>  1 file changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e77d4b8856a7..7c245185c71f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8720,28 +8720,6 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
>  	.load_lut = intel_crtc_load_lut,
>  };
>  
> -static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
> -				  struct drm_crtc *crtc)
> -{
> -	struct drm_device *dev;
> -	struct drm_crtc *tmp;
> -	int crtc_mask = 1;
> -
> -	WARN(!crtc, "checking null crtc?\n");
> -
> -	dev = crtc->dev;
> -
> -	list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
> -		if (tmp == crtc)
> -			break;
> -		crtc_mask <<= 1;
> -	}
> -
> -	if (encoder->possible_crtcs & crtc_mask)
> -		return true;
> -	return false;
> -}
> -
>  /**
>   * intel_modeset_update_staged_output_state
>   *
> @@ -9923,8 +9901,8 @@ intel_modeset_stage_output_state(struct drm_device *dev,
>  		}
>  
>  		/* Make sure the new CRTC will work with the encoder */
> -		if (!intel_encoder_crtc_ok(&connector->new_encoder->base,
> -					   new_crtc)) {
> +		if (!drm_encoder_crtc_ok(&connector->new_encoder->base,
> +					 new_crtc)) {
>  			return -EINVAL;
>  		}
>  		connector->encoder->new_crtc = to_intel_crtc(new_crtc);
> -- 
> 1.8.4.2
>

-- 
Jani Nikula, Intel Open Source Technology Center

      reply	other threads:[~2014-01-13 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 14:07 [PATCH v3 0/3] drm: Introduce drm_crtc_index() and drm_crtc_mask() Thierry Reding
2014-01-13 14:07 ` [PATCH v3 1/3] drm: provide a helper for the encoder possible_crtcs mask Thierry Reding
2014-01-13 14:07 ` [PATCH v3 2/3] drm: Move drm_encoder_crtc_ok() to core Thierry Reding
2014-01-13 14:07 ` [PATCH v3 3/3] drm/i915: Use drm_encoder_crtc_ok() Thierry Reding
2014-01-13 14:19   ` Jani Nikula [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=87mwj09d79.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=thierry.reding@gmail.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