All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: stylon.wang@amd.com, shashank.sharma@amd.com, thong.thai@amd.com,
	dri-devel@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	amd-gfx@lists.freedesktop.org, wayne.lin@amd.com,
	alexander.deucher@amd.com, nicholas.kazlauskas@amd.com
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode
Date: Thu, 14 Jan 2021 11:14:45 +0200	[thread overview]
Message-ID: <20210114111445.1d2bbf62@eldfell> (raw)
In-Reply-To: <20210104210800.789944-2-aurabindo.pillai@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 3482 bytes --]

On Mon, 4 Jan 2021 16:07:58 -0500
Aurabindo Pillai <aurabindo.pillai@amd.com> wrote:

> [Why&How]
> Adds a module parameter to enable experimental freesync video mode modeset
> optimization. Enabling this mode allows the driver to skip a full modeset when
> freesync compatible modes are requested by the userspace. This paramters also
> adds some standard modes based on the connected monitor's VRR range.
> 
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Acked-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h     |  1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 100a431f0792..12b13a90eddf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -177,6 +177,7 @@ extern int amdgpu_gpu_recovery;
>  extern int amdgpu_emu_mode;
>  extern uint amdgpu_smu_memory_pool_size;
>  extern uint amdgpu_dc_feature_mask;
> +extern uint amdgpu_exp_freesync_vid_mode;
>  extern uint amdgpu_dc_debug_mask;
>  extern uint amdgpu_dm_abm_level;
>  extern struct amdgpu_mgpu_info mgpu_info;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index b48d7a3c2a11..2badbc8b2294 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -158,6 +158,7 @@ int amdgpu_mes;
>  int amdgpu_noretry = -1;
>  int amdgpu_force_asic_type = -1;
>  int amdgpu_tmz;
> +uint amdgpu_exp_freesync_vid_mode;
>  int amdgpu_reset_method = -1; /* auto */
>  int amdgpu_num_kcq = -1;
>  
> @@ -786,6 +787,17 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
>  MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
>  module_param_named(tmz, amdgpu_tmz, int, 0444);
>  
> +/**
> + * DOC: experimental_freesync_video (uint)
> + * Enabled the optimization to adjust front porch timing to achieve seamless mode change experience
> + * when setting a freesync supported mode for which full modeset is not needed.
> + * The default value: 0 (off).
> + */
> +MODULE_PARM_DESC(
> +	freesync_video,
> +	"Enable freesync modesetting optimization feature (0 = off (default), 1 = on)");
> +module_param_named(freesync_video, amdgpu_exp_freesync_vid_mode, uint, 0444);
> +
>  /**
>   * DOC: reset_method (int)
>   * GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)

Hi,

please document somewhere that ends up in git history (commit message,
code comments, description of the parameter would be the best but maybe
there isn't enough space?) what Christian König explained in

https://lists.freedesktop.org/archives/dri-devel/2020-December/291254.html

that this is a stop-gap feature intended to be removed as soon as
possible (when a better solution comes up, which could be years).

So far I have not seen a single mention of this intention in your patch
submissions, and I think it is very important to make known.

I also did not see an explanation of why this instead of manufacturing
these video modes in userspace (an idea mentioned by Christian in the
referenced email). I think that too should be part of a commit message.


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: stylon.wang@amd.com, shashank.sharma@amd.com, thong.thai@amd.com,
	dri-devel@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	amd-gfx@lists.freedesktop.org, "Daniel Vetter" <daniel@ffwll.ch>,
	wayne.lin@amd.com, alexander.deucher@amd.com,
	nicholas.kazlauskas@amd.com
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode
Date: Thu, 14 Jan 2021 11:14:45 +0200	[thread overview]
Message-ID: <20210114111445.1d2bbf62@eldfell> (raw)
In-Reply-To: <20210104210800.789944-2-aurabindo.pillai@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 3482 bytes --]

On Mon, 4 Jan 2021 16:07:58 -0500
Aurabindo Pillai <aurabindo.pillai@amd.com> wrote:

> [Why&How]
> Adds a module parameter to enable experimental freesync video mode modeset
> optimization. Enabling this mode allows the driver to skip a full modeset when
> freesync compatible modes are requested by the userspace. This paramters also
> adds some standard modes based on the connected monitor's VRR range.
> 
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Acked-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h     |  1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 100a431f0792..12b13a90eddf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -177,6 +177,7 @@ extern int amdgpu_gpu_recovery;
>  extern int amdgpu_emu_mode;
>  extern uint amdgpu_smu_memory_pool_size;
>  extern uint amdgpu_dc_feature_mask;
> +extern uint amdgpu_exp_freesync_vid_mode;
>  extern uint amdgpu_dc_debug_mask;
>  extern uint amdgpu_dm_abm_level;
>  extern struct amdgpu_mgpu_info mgpu_info;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index b48d7a3c2a11..2badbc8b2294 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -158,6 +158,7 @@ int amdgpu_mes;
>  int amdgpu_noretry = -1;
>  int amdgpu_force_asic_type = -1;
>  int amdgpu_tmz;
> +uint amdgpu_exp_freesync_vid_mode;
>  int amdgpu_reset_method = -1; /* auto */
>  int amdgpu_num_kcq = -1;
>  
> @@ -786,6 +787,17 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);
>  MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");
>  module_param_named(tmz, amdgpu_tmz, int, 0444);
>  
> +/**
> + * DOC: experimental_freesync_video (uint)
> + * Enabled the optimization to adjust front porch timing to achieve seamless mode change experience
> + * when setting a freesync supported mode for which full modeset is not needed.
> + * The default value: 0 (off).
> + */
> +MODULE_PARM_DESC(
> +	freesync_video,
> +	"Enable freesync modesetting optimization feature (0 = off (default), 1 = on)");
> +module_param_named(freesync_video, amdgpu_exp_freesync_vid_mode, uint, 0444);
> +
>  /**
>   * DOC: reset_method (int)
>   * GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)

Hi,

please document somewhere that ends up in git history (commit message,
code comments, description of the parameter would be the best but maybe
there isn't enough space?) what Christian König explained in

https://lists.freedesktop.org/archives/dri-devel/2020-December/291254.html

that this is a stop-gap feature intended to be removed as soon as
possible (when a better solution comes up, which could be years).

So far I have not seen a single mention of this intention in your patch
submissions, and I think it is very important to make known.

I also did not see an explanation of why this instead of manufacturing
these video modes in userspace (an idea mentioned by Christian in the
referenced email). I think that too should be part of a commit message.


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-01-14  9:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 21:07 [PATCH v3 0/3] Experimental freesync video mode optimization Aurabindo Pillai
2021-01-04 21:07 ` Aurabindo Pillai
2021-01-04 21:07 ` [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode Aurabindo Pillai
2021-01-04 21:07   ` Aurabindo Pillai
2021-01-14  9:14   ` Pekka Paalanen [this message]
2021-01-14  9:14     ` Pekka Paalanen
2021-01-18 14:36     ` Aurabindo Pillai
2021-01-18 14:36       ` Aurabindo Pillai
2021-01-19  8:35       ` Pekka Paalanen
2021-01-19  8:35         ` Pekka Paalanen
2021-01-19 13:11         ` Daniel Vetter
2021-01-19 13:11           ` Daniel Vetter
2021-01-19 16:08           ` Pillai, Aurabindo
2021-01-19 16:08             ` Pillai, Aurabindo
2021-01-19 18:58             ` Daniel Vetter
2021-01-19 18:58               ` Daniel Vetter
2021-01-04 21:07 ` [PATCH v3 2/3] drm/amd/display: Add freesync video modes based on preferred modes Aurabindo Pillai
2021-01-04 21:07   ` Aurabindo Pillai
2021-01-04 21:08 ` [PATCH v3 3/3] drm/amd/display: Skip modeset for front porch change Aurabindo Pillai
2021-01-04 21:08   ` Aurabindo Pillai
2021-01-06 20:02   ` Kazlauskas, Nicholas
2021-01-06 20:02     ` Kazlauskas, Nicholas
2021-01-17 19:52     ` Aurabindo Pillai
2021-01-17 19:52       ` Aurabindo Pillai
  -- strict thread matches above, loose matches on Subject: below --
2020-12-14 22:20 [PATCH v3 0/3] Experimental freesync video mode optimization Aurabindo Pillai
2020-12-14 22:20 ` [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode Aurabindo Pillai
2020-12-14 22:20   ` Aurabindo Pillai
2020-12-17 19:11   ` Alex Deucher
2020-12-17 19:11     ` Alex Deucher
2020-12-17 22:37     ` Aurabindo Pillai
2020-12-17 22:37       ` Aurabindo Pillai

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=20210114111445.1d2bbf62@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=shashank.sharma@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=thong.thai@amd.com \
    --cc=wayne.lin@amd.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 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.