All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: don't chnage the original mode in dp_mode_fixup
Date: Wed, 30 May 2012 11:58:43 +0100	[thread overview]
Message-ID: <1338375553_355051@CP5-2952> (raw)
In-Reply-To: <1338373684-23995-1-git-send-email-daniel.vetter@ffwll.ch>

On Wed, 30 May 2012 12:28:04 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> We should only frob adjusted_mode. This is in preparation of
> a massive patch by Laurent Pinchart to make the mode argument
> const.
> 
> The only thing we actually touch is mode->clock, but only if
> it's a panel. And in that case we also set adjusted_mode->clock
> to the same value. All the generic code already uses the
> adjusted_mode exclusively, so we only have to move the dp
> link bw calculations over to that. This requires a small
> changes so that the shared code with mode_valid doesn't
> touch the mode argument.

Separate patch please, I'm sure you are right, but that is the scary
one...

> 
> Also mark the mode argument of pch_panel_fitting const.
> 
> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_dp.c    |   19 +++++++------------
>  drivers/gpu/drm/i915/intel_drv.h   |    2 +-
>  drivers/gpu/drm/i915/intel_panel.c |    2 +-
>  3 files changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 296cfc2..05c4748 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -222,7 +222,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes)
>  static bool
>  intel_dp_adjust_dithering(struct intel_dp *intel_dp,
>  			  struct drm_display_mode *mode,
> -			  struct drm_display_mode *adjusted_mode)
> +			  bool adjust_mode)

Would this look more pleasant if you rewrote this function so that the
adjustment of flags was done in the caller?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-05-30 10:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 10:28 [PATCH] drm/i915: don't chnage the original mode in dp_mode_fixup Daniel Vetter
2012-05-30 10:58 ` Chris Wilson [this message]
2012-05-30 11:32   ` Daniel Vetter
2012-05-30 11:52     ` [PATCH 1/2] drm/i915: adjusted_mode->clock in the dp mode_fixup Daniel Vetter
2012-05-30 11:52       ` [PATCH 2/2] drm/i915: don't chnage the original mode in dp_mode_fixup Daniel Vetter
2012-05-30 13:34         ` Paul Menzel
2012-05-30 12:18       ` [PATCH 1/2] drm/i915: adjusted_mode->clock in the dp mode_fixup Chris Wilson
2012-05-30 12:51         ` Daniel Vetter
2012-05-30 13:34           ` [PATCH] drm/i915: compute the target_clock for edp directly Daniel Vetter
2012-05-31  9:49             ` Chris Wilson
2012-05-31 10:03               ` Daniel Vetter
2012-05-31 10:31                 ` Chris Wilson
2012-05-31 10:49                   ` 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=1338375553_355051@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --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.