AMD-GFX Archive mirror
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Pratap Nirujogi <pratap.nirujogi@amd.com>, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, mlimonci@amd.com,
	benjamin.chan@amd.com, king.li@amd.com, bin.du@amd.com
Subject: Re: [PATCH v2 3/3] drm/amd/amdgpu: Enable ISP in amdgpu_discovery
Date: Thu, 9 May 2024 14:56:02 -0500	[thread overview]
Message-ID: <fec72f93-4f8f-4d84-8d45-45c3273e6ece@amd.com> (raw)
In-Reply-To: <20240509193531.129092-4-pratap.nirujogi@amd.com>

On 5/9/2024 14:35, Pratap Nirujogi wrote:
> Enable ISP for ISP V4.1.0 and V4.1.1 in amdgpu_discovery.
> 
> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 22 +++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 6586feab8c2c..82d064adaa49 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -107,6 +107,7 @@
>   #include "jpeg_v5_0_0.h"
>   
>   #include "amdgpu_vpe.h"
> +#include "amdgpu_isp.h"
>   
>   #define FIRMWARE_IP_DISCOVERY "amdgpu/ip_discovery.bin"
>   MODULE_FIRMWARE(FIRMWARE_IP_DISCOVERY);
> @@ -682,6 +683,10 @@ static void amdgpu_discovery_read_from_harvest_table(struct amdgpu_device *adev,
>   			adev->sdma.sdma_mask &=
>   				~(1U << harvest_info->list[i].number_instance);
>   			break;
> +		case ISP_HWID:
> +			adev->isp.harvest_config |=
> +				~(1U << harvest_info->list[i].number_instance);
> +			break;
>   		default:
>   			break;
>   		}
> @@ -2303,6 +2308,20 @@ static int amdgpu_discovery_set_umsch_mm_ip_blocks(struct amdgpu_device *adev)
>   	return 0;
>   }
>   
> +static int amdgpu_discovery_set_isp_ip_blocks(struct amdgpu_device *adev)
> +{
> +	switch (amdgpu_ip_version(adev, ISP_HWIP, 0)) {
> +	case IP_VERSION(4, 1, 0):
> +	case IP_VERSION(4, 1, 1):
> +		amdgpu_device_ip_block_add(adev, &isp_ip_block);
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	return 0;
> +}
> +
>   int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
>   {
>   	int r;
> @@ -2829,6 +2848,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
>   	if (r)
>   		return r;
>   
> +	r = amdgpu_discovery_set_isp_ip_blocks(adev);
> +	if (r)
> +		return r;
>   	return 0;
>   }
>   


      reply	other threads:[~2024-05-09 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 19:35 [PATCH v2 0/3] Add ISP driver support in amdgpu Pratap Nirujogi
2024-05-09 19:35 ` [PATCH v2 1/3] drm/amd/amdgpu: Add ISP support to amdgpu_discovery Pratap Nirujogi
2024-05-09 19:55   ` Mario Limonciello
2024-05-09 19:35 ` [PATCH v2 2/3] drm/amd/amdgpu: Add ISP driver support Pratap Nirujogi
2024-05-09 19:55   ` Mario Limonciello
2024-05-09 22:13     ` Nirujogi, Pratap
2024-05-09 19:35 ` [PATCH v2 3/3] drm/amd/amdgpu: Enable ISP in amdgpu_discovery Pratap Nirujogi
2024-05-09 19:56   ` Mario Limonciello [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=fec72f93-4f8f-4d84-8d45-45c3273e6ece@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=benjamin.chan@amd.com \
    --cc=bin.du@amd.com \
    --cc=king.li@amd.com \
    --cc=mlimonci@amd.com \
    --cc=pratap.nirujogi@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 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 read-only IMAP folder(s) and NNTP newsgroup(s).