[PATCH 15/35] drm/amd/display: make vline_config parameter const.
Nils Wallménius
nils.wallmenius at gmail.com
Sun Feb 3 17:49:21 UTC 2019
Hi,
It seems the commit title is a little confusing. The change is to now pass
by (const) reference rather than by value.
Regards
Nils
Den fre 1 feb. 2019 16:29 skrev Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com
>:
> From: Yongqiang Sun <yongqiang.sun at amd.com>
>
> Change-Id: Icfe018c7579ad2b3ef65195f578b8e44422d53f3
> Signed-off-by: Yongqiang Sun <yongqiang.sun at amd.com>
> Reviewed-by: Aric Cyr <Aric.Cyr at amd.com>
> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++--
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 8 ++++----
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 2 +-
> drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 2 +-
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c
> b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index e0ac009f00ab..d8579b207300 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -1560,11 +1560,11 @@ static void commit_planes_do_stream_update(struct
> dc *dc,
>
> if (stream_update->vline0_config &&
> pipe_ctx->stream_res.tg->funcs->program_vline_interrupt)
>
> pipe_ctx->stream_res.tg->funcs->program_vline_interrupt(
> - pipe_ctx->stream_res.tg, VLINE0,
> stream->vline0_config);
> + pipe_ctx->stream_res.tg, VLINE0,
> &stream->vline0_config);
>
> if (stream_update->vline1_config &&
> pipe_ctx->stream_res.tg->funcs->program_vline_interrupt)
>
> pipe_ctx->stream_res.tg->funcs->program_vline_interrupt(
> - pipe_ctx->stream_res.tg, VLINE1,
> stream->vline1_config);
> + pipe_ctx->stream_res.tg, VLINE1,
> &stream->vline1_config);
>
> if ((stream_update->hdr_static_metadata &&
> !stream->use_dynamic_meta) ||
> stream_update->vrr_infopacket ||
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
> b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
> index 1d4f9b48ed7d..cefa322df8a6 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
> @@ -95,19 +95,19 @@ static void optc1_disable_stereo(struct
> timing_generator *optc)
> void optc1_program_vline_interrupt(
> struct timing_generator *optc,
> enum vline_select vline,
> - struct vline_config vline_config)
> + const struct vline_config *vline_config)
> {
> struct optc *optc1 = DCN10TG_FROM_TG(optc);
>
> switch (vline) {
> case VLINE0:
> REG_SET_2(OTG_VERTICAL_INTERRUPT0_POSITION, 0,
> - OTG_VERTICAL_INTERRUPT0_LINE_START,
> vline_config.start_line,
> - OTG_VERTICAL_INTERRUPT0_LINE_END,
> vline_config.end_line);
> + OTG_VERTICAL_INTERRUPT0_LINE_START,
> vline_config->start_line,
> + OTG_VERTICAL_INTERRUPT0_LINE_END,
> vline_config->end_line);
> break;
> case VLINE1:
> REG_SET(OTG_VERTICAL_INTERRUPT1_POSITION, 0,
> -
> OTG_VERTICAL_INTERRUPT1_LINE_START, vline_config.start_line);
> +
> OTG_VERTICAL_INTERRUPT1_LINE_START, vline_config->start_line);
> break;
> default:
> break;
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
> b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
> index 8eb71c0160a7..b34c8a240598 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
> @@ -485,7 +485,7 @@ void optc1_program_timing(
>
> void optc1_program_vline_interrupt(struct timing_generator *optc,
> enum vline_select vline,
> - struct vline_config vline_config);
> + const struct vline_config *vline_config);
>
> void optc1_program_global_sync(
> struct timing_generator *optc);
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
> b/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
> index df64cf73ceb9..d22a406c19c0 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
> @@ -151,7 +151,7 @@ struct timing_generator_funcs {
> bool use_vbios);
> void (*program_vline_interrupt)(struct timing_generator *optc,
> enum vline_select vline,
> - struct vline_config vline_config);
> + const struct vline_config *vline_config);
> bool (*enable_crtc)(struct timing_generator *tg);
> bool (*disable_crtc)(struct timing_generator *tg);
> bool (*is_counter_moving)(struct timing_generator *tg);
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190203/91e4a8ea/attachment-0001.html>
More information about the amd-gfx
mailing list