Re: [PATCH] drm/i915: don't chnage the original mode in dp_mode_fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Wed, 30 May 2012 12:28:04 +0200, Daniel Vetter <daniel.vetter@xxxxxxxx> 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

> Also mark the mode argument of pch_panel_fitting const.
> Reported-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  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 Wilson, Intel Open Source Technology Centre
dri-devel mailing list

[Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86] [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]

Add to Google Powered by Linux