Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-07 Thread Bin Li
Hi Mario,

I found I missed the part
in drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c with kai.heng's
review.
I will rebuild a new kernel and test it again, and reply later, sorry about
that.



On Thu, Dec 7, 2023 at 2:58 PM Kai-Heng Feng 
wrote:

> On Thu, Dec 7, 2023 at 10:10 AM Mario Limonciello
>  wrote:
> >
> > On 12/6/2023 20:07, Kai-Heng Feng wrote:
> > > On Thu, Dec 7, 2023 at 9:57 AM Mario Limonciello
> > >  wrote:
> > >>
> > >> On 12/6/2023 19:23, Kai-Heng Feng wrote:
> > >>> On Wed, Dec 6, 2023 at 4:29 AM Mario Limonciello
> > >>>  wrote:
> > >>>>
> > >>>> On 12/5/2023 14:17, Hamza Mahfooz wrote:
> > >>>>> We currently don't support dirty rectangles on hardware rotated
> modes.
> > >>>>> So, if a user is using hardware rotated modes with PSR-SU enabled,
> > >>>>> use PSR-SU FFU for all rotated planes (including cursor planes).
> > >>>>>
> > >>>>
> > >>>> Here is the email for the original reporter to give an attribution
> tag.
> > >>>>
> > >>>> Reported-by: Kai-Heng Feng 
> > >>>
> > >>> For this particular issue,
> > >>> Tested-by: Kai-Heng Feng 
> > >>
> > >> Can you confirm what kernel base you tested issue against?
> > >>
> > >> I ask because Bin Li (+CC) also tested it against 6.1 based LTS kernel
> > >> but ran into problems.
> > >
> > > The patch was tested against ADSN.
> > >
> > >>
> > >> I wonder if it's because of other dependency patches.  If that's the
> > >> case it would be good to call them out in the Cc: @stable as
> > >> dependencies so when Greg or Sasha backport this 6.1 doesn't get
> broken.
> > >
> > > Probably. I haven't really tested any older kernel series.
> >
> > Since you've got a good environment to test it and reproduce it would
> > you mind double checking it against 6.7-rc, 6.5 and 6.1 trees?  If we
> > don't have confidence it works on the older trees I think we'll need to
> > drop the stable tag.
>
> Not seeing issues here when the patch is applied against 6.5 and 6.1
> (which needs to resolve a minor conflict).
>
> I am not sure what happened for Bin's case.
>
> Kai-Heng
>
> > >
> > > Kai-Heng
> > >
> > >>
> > >> Bin,
> > >>
> > >> Could you run ./scripts/decode_stacktrace.sh on your kernel trace to
> > >> give us a specific line number on the issue you hit?
> > >>
> > >> Thanks!
> > >>>
> > >>>>
> > >>>>> Cc: sta...@vger.kernel.org
> > >>>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2952
> > >>>>> Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS
> support")
> > >>>>> Signed-off-by: Hamza Mahfooz 
> > >>>>> ---
> > >>>>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c|  4 
> > >>>>> drivers/gpu/drm/amd/display/dc/dc_hw_types.h |  1 +
> > >>>>> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c| 12
> ++--
> > >>>>> .../gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c  |  3 ++-
> > >>>>> 4 files changed, 17 insertions(+), 3 deletions(-)
> > >>>>>
> > >>>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > >>>>> index c146dc9cba92..79f8102d2601 100644
> > >>>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > >>>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > >>>>> @@ -5208,6 +5208,7 @@ static void fill_dc_dirty_rects(struct
> drm_plane *plane,
> > >>>>> bool bb_changed;
> > >>>>> bool fb_changed;
> > >>>>> u32 i = 0;
> > >>>>> +
> > >>>>
> > >>>> Looks like a spurious newline here.
> > >>>>
> > >>>>> *dirty_regions_changed = false;
> > >>>>>
> > >>>>> /*
> > >>>>> @@ -5217,6 +5218,9 @@ static void fill_dc_dirty_rects(struct
> drm_plane *plane,
> > >>>>> if (plane-

Re: [PATCH] drm/amd/display: fix hw rotated modes when PSR-SU is enabled

2023-12-07 Thread Bin Li
Hi Mario,

 It's a false alarm from my side, after testing the 6.1.0-oem and
6.5.0-oem kernels, this patch works perfectly fine, sorry about that.

On Thu, Dec 7, 2023 at 3:47 PM Bin Li  wrote:
>
> Hi Mario,
>
> I found I missed the part in 
> drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c with kai.heng's 
> review.
> I will rebuild a new kernel and test it again, and reply later, sorry about 
> that.
>
>
>
> On Thu, Dec 7, 2023 at 2:58 PM Kai-Heng Feng  
> wrote:
>>
>> On Thu, Dec 7, 2023 at 10:10 AM Mario Limonciello
>>  wrote:
>> >
>> > On 12/6/2023 20:07, Kai-Heng Feng wrote:
>> > > On Thu, Dec 7, 2023 at 9:57 AM Mario Limonciello
>> > >  wrote:
>> > >>
>> > >> On 12/6/2023 19:23, Kai-Heng Feng wrote:
>> > >>> On Wed, Dec 6, 2023 at 4:29 AM Mario Limonciello
>> > >>>  wrote:
>> > >>>>
>> > >>>> On 12/5/2023 14:17, Hamza Mahfooz wrote:
>> > >>>>> We currently don't support dirty rectangles on hardware rotated 
>> > >>>>> modes.
>> > >>>>> So, if a user is using hardware rotated modes with PSR-SU enabled,
>> > >>>>> use PSR-SU FFU for all rotated planes (including cursor planes).
>> > >>>>>
>> > >>>>
>> > >>>> Here is the email for the original reporter to give an attribution 
>> > >>>> tag.
>> > >>>>
>> > >>>> Reported-by: Kai-Heng Feng 
>> > >>>
>> > >>> For this particular issue,
>> > >>> Tested-by: Kai-Heng Feng 
>> > >>
>> > >> Can you confirm what kernel base you tested issue against?
>> > >>
>> > >> I ask because Bin Li (+CC) also tested it against 6.1 based LTS kernel
>> > >> but ran into problems.
>> > >
>> > > The patch was tested against ADSN.
>> > >
>> > >>
>> > >> I wonder if it's because of other dependency patches.  If that's the
>> > >> case it would be good to call them out in the Cc: @stable as
>> > >> dependencies so when Greg or Sasha backport this 6.1 doesn't get broken.
>> > >
>> > > Probably. I haven't really tested any older kernel series.
>> >
>> > Since you've got a good environment to test it and reproduce it would
>> > you mind double checking it against 6.7-rc, 6.5 and 6.1 trees?  If we
>> > don't have confidence it works on the older trees I think we'll need to
>> > drop the stable tag.
>>
>> Not seeing issues here when the patch is applied against 6.5 and 6.1
>> (which needs to resolve a minor conflict).
>>
>> I am not sure what happened for Bin's case.
>>
>> Kai-Heng
>>
>> > >
>> > > Kai-Heng
>> > >
>> > >>
>> > >> Bin,
>> > >>
>> > >> Could you run ./scripts/decode_stacktrace.sh on your kernel trace to
>> > >> give us a specific line number on the issue you hit?
>> > >>
>> > >> Thanks!
>> > >>>
>> > >>>>
>> > >>>>> Cc: sta...@vger.kernel.org
>> > >>>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2952
>> > >>>>> Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support")
>> > >>>>> Signed-off-by: Hamza Mahfooz 
>> > >>>>> ---
>> > >>>>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c|  4 
>> > >>>>> drivers/gpu/drm/amd/display/dc/dc_hw_types.h |  1 +
>> > >>>>> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c| 12 
>> > >>>>> ++--
>> > >>>>> .../gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c  |  3 ++-
>> > >>>>> 4 files changed, 17 insertions(+), 3 deletions(-)
>> > >>>>>
>> > >>>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
>> > >>>>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > >>>>> index c146dc9cba92..79f8102d2601 100644
>> > >>>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > >>>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > >>>>> @@ -5208,6 +5