All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: "Deucher, Alexander" <alexander.deucher@amd.com>,
	Joshua Aberback <joshua.aberback@amd.com>,
	Roman Li <roman.li@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amd/display: Create and Destroy PSR resources for DCN302
Date: Tue, 22 Dec 2020 10:09:59 -0500	[thread overview]
Message-ID: <CADnq5_PCBYbnORTENgNE4Z_wd0-4GNq8g0Jj+P=99YHh_YS5OQ@mail.gmail.com> (raw)
In-Reply-To: <20201218221616.2452182-1-Bhawanpreet.Lakha@amd.com>

On Fri, Dec 18, 2020 at 5:16 PM Bhawanpreet Lakha
<Bhawanpreet.Lakha@amd.com> wrote:
>
> From: Joshua Aberback <joshua.aberback@amd.com>
>
> We need these to support PSR on DCN302
>
> Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  .../gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
> index 808c4dcdb3ac..8d24cd5e484e 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c
> @@ -53,6 +53,7 @@
>  #include "dce/dce_i2c_hw.h"
>  #include "dce/dce_panel_cntl.h"
>  #include "dce/dmub_abm.h"
> +#include "dce/dmub_psr.h"
>
>  #include "hw_sequencer_private.h"
>  #include "reg_helper.h"
> @@ -238,6 +239,7 @@ static const struct dc_debug_options debug_defaults_diags = {
>                 .dwb_fi_phase = -1, // -1 = disable
>                 .dmub_command_table = true,
>                 .enable_tri_buf = true,
> +               .disable_psr = true,
>  };
>
>  enum dcn302_clk_src_array_id {
> @@ -1213,6 +1215,9 @@ static void dcn302_resource_destruct(struct resource_pool *pool)
>                         dce_abm_destroy(&pool->multiple_abms[i]);
>         }
>
> +       if (pool->psr != NULL)
> +               dmub_psr_destroy(&pool->psr);
> +
>         if (pool->dccg != NULL)
>                 dcn_dccg_destroy(&pool->dccg);
>  }
> @@ -1469,6 +1474,14 @@ static bool dcn302_resource_construct(
>         }
>         pool->timing_generator_count = i;
>
> +       /* PSR */
> +       pool->psr = dmub_psr_create(ctx);
> +       if (pool->psr == NULL) {
> +               dm_error("DC: failed to create psr!\n");
> +               BREAK_TO_DEBUGGER();
> +               goto create_fail;
> +       }
> +
>         /* ABMs */
>         for (i = 0; i < pool->res_cap->num_timing_generator; i++) {
>                 pool->multiple_abms[i] = dmub_abm_create(ctx, &abm_regs[i], &abm_shift, &abm_mask);
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2020-12-22 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 22:16 [PATCH] drm/amd/display: Create and Destroy PSR resources for DCN302 Bhawanpreet Lakha
2020-12-22 15:09 ` Alex Deucher [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='CADnq5_PCBYbnORTENgNE4Z_wd0-4GNq8g0Jj+P=99YHh_YS5OQ@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=joshua.aberback@amd.com \
    --cc=roman.li@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.