amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Abramov, Slava" <Slava.Abramov@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/display: re-add surface size calculation in dcn30_hwseq.c
Date: Tue, 27 Oct 2020 15:27:49 +0000	[thread overview]
Message-ID: <MWHPR12MB1629F72ECDD71E0C9B443CB2FE160@MWHPR12MB1629.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CADnq5_Me2LV2Rp-gLhzqqc76y8ddXnmfuVu66BYZbo48L0ZREQ@mail.gmail.com>


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

[AMD Official Use Only - Internal Distribution Only]

Looks sane to me.

Acked-by: Slava Abramov <slava.abramov@amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Alex Deucher <alexdeucher@gmail.com>
Sent: Tuesday, October 27, 2020 11:20 AM
To: amd-gfx list <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/display: re-add surface size calculation in dcn30_hwseq.c

Ping?

On Mon, Oct 26, 2020 at 12:14 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> This is required for MALL.  Was accidently removed in PRS update.
>
> Fixes: 48e48e598478 ("drm/amd/display: Disable idle optimization when PSR is enabled")
> Fixes: 52f2e83e2fe5 ("drm/amdgpu/display: add MALL support (v2)")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  .../gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> index f3ae208850b0..cc2eca8c9a62 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
> @@ -715,6 +715,21 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
>                                         break;
>                         }
>
> +                       if (dc->current_state->stream_count == 1 // single display only
> +                           && dc->current_state->stream_status[0].plane_count == 1 // single surface only
> +                           && dc->current_state->stream_status[0].plane_states[0]->address.page_table_base.quad_part == 0 // no VM
> +                           // Only 8 and 16 bit formats
> +                           && dc->current_state->stream_status[0].plane_states[0]->format <= SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F
> +                           && dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB8888) {
> +                               surface_size = dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_pitch *
> +                                       dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_size.height *
> +                                       (dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ?
> +                                        8 : 4);
> +                       } else {
> +                               // TODO: remove hard code size
> +                               surface_size = 128 * 1024 * 1024;
> +                       }
> +
>                         // TODO: remove hard code size
>                         if (surface_size < 128 * 1024 * 1024) {
>                                 refresh_hz = div_u64((unsigned long long) dc->current_state->streams[0]->timing.pix_clk_100hz *
> --
> 2.25.4
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cslava.abramov%40amd.com%7Ce1c9b8c00a2e4a54ca2608d87a8bd178%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637394088245930973%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=kRMXUEm5Y%2BkYhwBNWUrH6mm8dRYARwXjgXy%2BET4%2BaPk%3D&amp;reserved=0

[-- Attachment #1.2: Type: text/html, Size: 8348 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:[~2020-10-27 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 16:14 [PATCH] drm/amdgpu/display: re-add surface size calculation in dcn30_hwseq.c Alex Deucher
2020-10-27 15:20 ` Alex Deucher
2020-10-27 15:27   ` Abramov, Slava [this message]

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=MWHPR12MB1629F72ECDD71E0C9B443CB2FE160@MWHPR12MB1629.namprd12.prod.outlook.com \
    --to=slava.abramov@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).