All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pillai, Aurabindo" <Aurabindo.Pillai@amd.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Wang, Chao-kai \(Stylon\)" <Stylon.Wang@amd.com>,
	"Thai, Thong" <Thong.Thai@amd.com>,
	"Sharma, Shashank" <Shashank.Sharma@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	"Lin, Wayne" <Wayne.Lin@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode
Date: Tue, 19 Jan 2021 16:08:54 +0000	[thread overview]
Message-ID: <BN6PR12MB1939001BFDF87A88748163498BA30@BN6PR12MB1939.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAKMK7uGKqA7mMorSBtV255pPxA=adPEP0Bcwot8OMmBVCKV_uQ@mail.gmail.com>


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

[AMD Official Use Only - Internal Distribution Only]

Hi Daniel,

Could you please be more specific about the _unsafe API options you mentioned ?

--

Thanks & Regards,
Aurabindo Pillai
________________________________
From: Daniel Vetter <daniel@ffwll.ch>
Sent: Tuesday, January 19, 2021 8:11 AM
To: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; dri-devel <dri-devel@lists.freedesktop.org>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Thai, Thong <Thong.Thai@amd.com>; Sharma, Shashank <Shashank.Sharma@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode

On Tue, Jan 19, 2021 at 9:35 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
>
> On Mon, 18 Jan 2021 09:36:47 -0500
> Aurabindo Pillai <aurabindo.pillai@amd.com> wrote:
>
> > On Thu, 2021-01-14 at 11:14 +0200, Pekka Paalanen wrote:
> > >
> > > 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Fdri-devel%2F2020-December%2F291254.html&amp;data=04%7C01%7Caurabindo.pillai%40amd.com%7C56ba07934c5c48e7ad7b08d8bc7bb4a9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637466586800649481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=GM0ZEM9JeFM5os13E1zlVy8Bn3D8Kxmo%2FajSG02WsGI%3D&amp;reserved=0
> > >
> > > 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.
> >
> > Hi,
> >
> > Thanks for the headsup, I shall add the relevant info in the next
> > verison.
> >
> > >
> > > 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.
> >
> > This is an opt-in feature, which shall be superseded by a better
> > solution. We also add a set of common modes for scaling similarly.
> > Userspace can still add whatever mode they want. So I dont see a reason
> > why this cant be in the kernel.
>
> Hi,
>
> sorry, I think that kind of thinking is backwards. There needs to be a
> reason to put something in the kernel, and if there is no reason, then
> it remains in userspace. So what's the reason to put this in the kernel?
>
> One example reason why this should not be in the kernel is that the set
> of video modes to manufacture is a kind of policy, which modes to add
> and which not. Userspace knows what modes it needs, and establishing
> the modes in the kernel instead is second-guessing what the userspace
> would want. So if userspace needs to manufacture modes in userspace
> anyway as some modes might be missed by the kernel, then why bother in
> the kernel to begin with? Why should the kernel play catch-up with what
> modes userspace wants when we already have everything userspace needs
> to make its own modes, even to add them to the kernel mode list?
>
> Does manufacturing these extra video modes to achieve fast timing
> changes require AMD hardware-specific knowledge, as opposed to the
> general VRR approach of simply adjusting the front porch?
>
> Something like this should also be documented in a commit message. Or
> if you insist that "no reason to not put this in the kernel" is reason
> enough, then write that down, because it does not seem obvious to me or
> others that this feature needs to be in the kernel.

One reason might be debugging, if a feature is known to cause issues.
But imo in that case the knob should be using the _unsafe variants so
it taints the kernel, since otherwise we get stuck in this very cozy
place where kernel maintainers don't have to care much for bugs
"because it's off by default", but also not really care about
polishing the feature "since users can just enable it if they want
it". Just a slightly different flavour of what you're explaining above
already.
-Daniel

> Thanks,
> pq



--
Daniel Vetter
Software Engineer, Intel Corporation
https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.ffwll.ch%2F&amp;data=04%7C01%7Caurabindo.pillai%40amd.com%7C56ba07934c5c48e7ad7b08d8bc7bb4a9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637466586800649481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2isCpwa3V92TnO4njhe9cQjdWVdsV1GQMo7WP7buVZI%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 8747 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: "Pillai, Aurabindo" <Aurabindo.Pillai@amd.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Wang, Chao-kai \(Stylon\)" <Stylon.Wang@amd.com>,
	"Thai, Thong" <Thong.Thai@amd.com>,
	"Sharma, Shashank" <Shashank.Sharma@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	Pekka Paalanen <ppaalanen@gmail.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	"Lin, Wayne" <Wayne.Lin@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode
Date: Tue, 19 Jan 2021 16:08:54 +0000	[thread overview]
Message-ID: <BN6PR12MB1939001BFDF87A88748163498BA30@BN6PR12MB1939.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAKMK7uGKqA7mMorSBtV255pPxA=adPEP0Bcwot8OMmBVCKV_uQ@mail.gmail.com>


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

[AMD Official Use Only - Internal Distribution Only]

Hi Daniel,

Could you please be more specific about the _unsafe API options you mentioned ?

--

Thanks & Regards,
Aurabindo Pillai
________________________________
From: Daniel Vetter <daniel@ffwll.ch>
Sent: Tuesday, January 19, 2021 8:11 AM
To: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; dri-devel <dri-devel@lists.freedesktop.org>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Thai, Thong <Thong.Thai@amd.com>; Sharma, Shashank <Shashank.Sharma@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: Re: [PATCH v3 1/3] drm/amd/display: Add module parameter for freesync video mode

On Tue, Jan 19, 2021 at 9:35 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
>
> On Mon, 18 Jan 2021 09:36:47 -0500
> Aurabindo Pillai <aurabindo.pillai@amd.com> wrote:
>
> > On Thu, 2021-01-14 at 11:14 +0200, Pekka Paalanen wrote:
> > >
> > > 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Fdri-devel%2F2020-December%2F291254.html&amp;data=04%7C01%7Caurabindo.pillai%40amd.com%7C56ba07934c5c48e7ad7b08d8bc7bb4a9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637466586800649481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=GM0ZEM9JeFM5os13E1zlVy8Bn3D8Kxmo%2FajSG02WsGI%3D&amp;reserved=0
> > >
> > > 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.
> >
> > Hi,
> >
> > Thanks for the headsup, I shall add the relevant info in the next
> > verison.
> >
> > >
> > > 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.
> >
> > This is an opt-in feature, which shall be superseded by a better
> > solution. We also add a set of common modes for scaling similarly.
> > Userspace can still add whatever mode they want. So I dont see a reason
> > why this cant be in the kernel.
>
> Hi,
>
> sorry, I think that kind of thinking is backwards. There needs to be a
> reason to put something in the kernel, and if there is no reason, then
> it remains in userspace. So what's the reason to put this in the kernel?
>
> One example reason why this should not be in the kernel is that the set
> of video modes to manufacture is a kind of policy, which modes to add
> and which not. Userspace knows what modes it needs, and establishing
> the modes in the kernel instead is second-guessing what the userspace
> would want. So if userspace needs to manufacture modes in userspace
> anyway as some modes might be missed by the kernel, then why bother in
> the kernel to begin with? Why should the kernel play catch-up with what
> modes userspace wants when we already have everything userspace needs
> to make its own modes, even to add them to the kernel mode list?
>
> Does manufacturing these extra video modes to achieve fast timing
> changes require AMD hardware-specific knowledge, as opposed to the
> general VRR approach of simply adjusting the front porch?
>
> Something like this should also be documented in a commit message. Or
> if you insist that "no reason to not put this in the kernel" is reason
> enough, then write that down, because it does not seem obvious to me or
> others that this feature needs to be in the kernel.

One reason might be debugging, if a feature is known to cause issues.
But imo in that case the knob should be using the _unsafe variants so
it taints the kernel, since otherwise we get stuck in this very cozy
place where kernel maintainers don't have to care much for bugs
"because it's off by default", but also not really care about
polishing the feature "since users can just enable it if they want
it". Just a slightly different flavour of what you're explaining above
already.
-Daniel

> Thanks,
> pq



--
Daniel Vetter
Software Engineer, Intel Corporation
https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.ffwll.ch%2F&amp;data=04%7C01%7Caurabindo.pillai%40amd.com%7C56ba07934c5c48e7ad7b08d8bc7bb4a9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637466586800649481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2isCpwa3V92TnO4njhe9cQjdWVdsV1GQMo7WP7buVZI%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 8747 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-19 16:09 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
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 [this message]
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=BN6PR12MB1939001BFDF87A88748163498BA30@BN6PR12MB1939.namprd12.prod.outlook.com \
    --to=aurabindo.pillai@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --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 \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@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.