AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/gmc10: adjust gart size for parts that support S/G display
Date: Fri, 8 Jul 2022 12:03:04 +0200	[thread overview]
Message-ID: <57e44bdf-9bea-4c9b-0b05-ff0b68fcf44c@gmail.com> (raw)
In-Reply-To: <20220707205530.899499-1-alexander.deucher@amd.com>

Am 07.07.22 um 22:55 schrieb Alex Deucher:
> For GMC 10 parts which support scatter/gather display (display
> from system memory), we should allocate a larger gart size
> to better handler larger displays.  This mirrors what we already
> do for GMC 9 parts.
>
> v2: fix typo (Alex)
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Acked-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> index 25d5743ae91b..1772f006c61a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> @@ -834,10 +834,21 @@ static int gmc_v10_0_mc_init(struct amdgpu_device *adev)
>   		adev->gmc.visible_vram_size = adev->gmc.real_vram_size;
>   
>   	/* set the gart size */
> -	if (amdgpu_gart_size == -1)
> -		adev->gmc.gart_size = 512ULL << 20;
> -	else
> +	if (amdgpu_gart_size == -1) {
> +		switch (adev->ip_versions[GC_HWIP][0]) {
> +		default:
> +			adev->gmc.gart_size = 512ULL << 20;
> +			break;
> +		case IP_VERSION(10, 3, 1):   /* DCE SG support */
> +		case IP_VERSION(10, 3, 3):   /* DCE SG support */
> +		case IP_VERSION(10, 3, 6):   /* DCE SG support */
> +		case IP_VERSION(10, 3, 7):   /* DCE SG support */
> +			adev->gmc.gart_size = 1024ULL << 20;
> +			break;
> +		}
> +	} else {
>   		adev->gmc.gart_size = (u64)amdgpu_gart_size << 20;
> +	}
>   
>   	gmc_v10_0_vram_gtt_location(adev, &adev->gmc);
>   


      reply	other threads:[~2022-07-08 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 20:55 [PATCH] drm/amdgpu/gmc10: adjust gart size for parts that support S/G display Alex Deucher
2022-07-08 10:03 ` Christian König [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=57e44bdf-9bea-4c9b-0b05-ff0b68fcf44c@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.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