All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liu, Aaron" <Aaron.Liu-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"Lakha,
	Bhawanpreet" <Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>,
	"Huang, Ray" <Ray.Huang-5C7GfCeVMHo@public.gmane.org>,
	"Wentland, Harry" <Harry.Wentland-5C7GfCeVMHo@public.gmane.org>,
	"Li, Roman" <Roman.Li-5C7GfCeVMHo@public.gmane.org>
Subject: RE: [PATCH] drm/amd/display: Add stereo mux and dig programming calls for dcn21
Date: Thu, 5 Sep 2019 00:56:56 +0000	[thread overview]
Message-ID: <MN2PR12MB38381556BD5AF70F1DF81539F0BB0@MN2PR12MB3838.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1567633392-26602-1-git-send-email-Roman.Li-5C7GfCeVMHo@public.gmane.org>

Acked-by: Aaron Liu <aaron.liu@amd.com>

BR,
Aaron Liu

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
> Roman.Li@amd.com
> Sent: Thursday, September 5, 2019 5:43 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Wentland, Harry <Harry.Wentland@amd.com>; Liu, Aaron
> <Aaron.Liu@amd.com>; Li, Roman <Roman.Li@amd.com>; Huang, Ray
> <Ray.Huang@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Lakha, Bhawanpreet
> <Bhawanpreet.Lakha@amd.com>
> Subject: [PATCH] drm/amd/display: Add stereo mux and dig programming
> calls for dcn21
> 
> From: Roman Li <Roman.Li@amd.com>
> 
> [Why]
> The earlier patch "Hook up calls to do stereo mux and dig programming..."
> doesn't include update for dcn21.
> 
> [How]
> Align dcn21 gpio settings with updated stereo control interface.
> 
> Signed-off-by: Roman Li <Roman.Li@amd.com>
> ---
>  .../amd/display/dc/gpio/dcn21/hw_factory_dcn21.c   | 38
> ++++++++++++++++++++--
>  .../amd/display/dc/gpio/dcn21/hw_translate_dcn21.c |  3 +-
>  2 files changed, 36 insertions(+), 5 deletions(-)
> 
> diff --git
> a/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
> b/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
> index 34485d9..8572678 100644
> --- a/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
> +++ b/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
> @@ -35,12 +35,10 @@
> 
>  #include "hw_factory_dcn21.h"
> 
> -
>  #include "dcn/dcn_2_1_0_offset.h"
>  #include "dcn/dcn_2_1_0_sh_mask.h"
>  #include "renoir_ip_offset.h"
> 
> -
>  #include "reg_helper.h"
>  #include "../hpd_regs.h"
>  /* begin *********************
> @@ -136,6 +134,39 @@ static const struct ddc_sh_mask ddc_mask[] = {
>  	DDC_MASK_SH_LIST_DCN2(_MASK, 6)
>  };
> 
> +#include "../generic_regs.h"
> +
> +/* set field name */
> +#define SF_GENERIC(reg_name, field_name, post_fix)\
> +	.field_name = reg_name ## __ ## field_name ## post_fix
> +
> +#define generic_regs(id) \
> +{\
> +	GENERIC_REG_LIST(id)\
> +}
> +
> +static const struct generic_registers generic_regs[] = {
> +	generic_regs(A),
> +};
> +
> +static const struct generic_sh_mask generic_shift[] = {
> +	GENERIC_MASK_SH_LIST(__SHIFT, A),
> +};
> +
> +static const struct generic_sh_mask generic_mask[] = {
> +	GENERIC_MASK_SH_LIST(_MASK, A),
> +};
> +
> +static void define_generic_registers(struct hw_gpio_pin *pin, uint32_t
> +en) {
> +	struct hw_generic *generic = HW_GENERIC_FROM_BASE(pin);
> +
> +	generic->regs = &generic_regs[en];
> +	generic->shifts = &generic_shift[en];
> +	generic->masks = &generic_mask[en];
> +	generic->base.regs = &generic_regs[en].gpio; }
> +
>  static void define_ddc_registers(
>  		struct hw_gpio_pin *pin,
>  		uint32_t en)
> @@ -181,7 +212,8 @@ static const struct hw_factory_funcs funcs = {
>  	.get_hpd_pin = dal_hw_hpd_get_pin,
>  	.get_generic_pin = dal_hw_generic_get_pin,
>  	.define_hpd_registers = define_hpd_registers,
> -	.define_ddc_registers = define_ddc_registers
> +	.define_ddc_registers = define_ddc_registers,
> +	.define_generic_registers = define_generic_registers
>  };
>  /*
>   * dal_hw_factory_dcn10_init
> diff --git
> a/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c
> b/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c
> index ad7c437..fbb58fb 100644
> --- a/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c
> +++ b/drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c
> @@ -58,7 +58,6 @@
>  #define SF_HPD(reg_name, field_name, post_fix)\
>  	.field_name = reg_name ## __ ## field_name ## post_fix
> 
> -
>  /* macros to expend register list macro defined in HW object header file
>   * end *********************/
> 
> @@ -71,7 +70,7 @@ static bool offset_to_id(  {
>  	switch (offset) {
>  	/* GENERIC */
> -	case REG(DC_GENERICA):
> +	case REG(DC_GPIO_GENERIC_A):
>  		*id = GPIO_ID_GENERIC;
>  		switch (mask) {
>  		case DC_GPIO_GENERIC_A__DC_GPIO_GENERICA_A_MASK:
> --
> 2.7.4
> 
> _______________________________________________
> 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

  parent reply	other threads:[~2019-09-05  0:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 21:43 [PATCH] drm/amd/display: Add stereo mux and dig programming calls for dcn21 Roman.Li-5C7GfCeVMHo
     [not found] ` <1567633392-26602-1-git-send-email-Roman.Li-5C7GfCeVMHo@public.gmane.org>
2019-09-05  0:56   ` Liu, Aaron [this message]
2019-09-05 12:45   ` Kazlauskas, Nicholas

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=MN2PR12MB38381556BD5AF70F1DF81539F0BB0@MN2PR12MB3838.namprd12.prod.outlook.com \
    --to=aaron.liu-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org \
    --cc=Harry.Wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=Ray.Huang-5C7GfCeVMHo@public.gmane.org \
    --cc=Roman.Li-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.