All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: "alexdeucher@gmail.com >> Alex Deucher" <alexdeucher@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: adjust default radeon_vm_block_size v2
Date: Sat, 26 Jul 2014 15:34:04 +0200	[thread overview]
Message-ID: <53D3AE4C.60704@vodafone.de> (raw)
In-Reply-To: <1405770958-1770-1-git-send-email-deathsimple@vodafone.de>

Hey Alex,

can you use this version instead of the one you already have in 
drm-next-3.17-wip? It depends on a change from drm-fixes-3.16, so you 
need to merge (or rebase) your -next branch to apply it.

Apart from that I also have a couple of more VM changes for 3.17, but 
those need a merge with the latest 3.16 fixes as well.

Thanks,
Christian.

Am 19.07.2014 um 13:55 schrieb Christian König:
> From: Christian König <christian.koenig@amd.com>
>
> v2: rebase on vm_size scale change. Adjust vm_size default to 8,
>      Better handle the default and smaller values.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/radeon/radeon_device.c | 14 +++++++++++++-
>   drivers/gpu/drm/radeon/radeon_drv.c    |  6 +++---
>   2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index a8537d7..38e13b0 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -1077,7 +1077,19 @@ static void radeon_check_arguments(struct radeon_device *rdev)
>   	/* defines number of bits in page table versus page directory,
>   	 * a page is 4KB so we have 12 bits offset, minimum 9 bits in the
>   	 * page table and the remaining bits are in the page directory */
> -	if (radeon_vm_block_size < 9) {
> +	if (radeon_vm_block_size == -1) {
> +
> +		/* Total bits covered by PD + PTs */
> +		unsigned bits = ilog2(radeon_vm_size) + 17;
> +
> +		/* Make sure the PD is 4K in size up to 8GB address space.
> +		   Above that split equal between PD and PTs */
> +		if (radeon_vm_size <= 8)
> +			radeon_vm_block_size = bits - 9;
> +		else
> +			radeon_vm_block_size = (bits + 3) / 2;
> +
> +	} else if (radeon_vm_block_size < 9) {
>   		dev_warn(rdev->dev, "VM page table size (%d) to small\n",
>   			 radeon_vm_block_size);
>   		radeon_vm_block_size = 9;
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index e9e3610..59b74d2 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -173,8 +173,8 @@ int radeon_dpm = -1;
>   int radeon_aspm = -1;
>   int radeon_runtime_pm = -1;
>   int radeon_hard_reset = 0;
> -int radeon_vm_size = 4;
> -int radeon_vm_block_size = 9;
> +int radeon_vm_size = 8;
> +int radeon_vm_block_size = -1;
>   int radeon_deep_color = 0;
>   
>   MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
> @@ -246,7 +246,7 @@ module_param_named(hard_reset, radeon_hard_reset, int, 0444);
>   MODULE_PARM_DESC(vm_size, "VM address space size in gigabytes (default 4GB)");
>   module_param_named(vm_size, radeon_vm_size, int, 0444);
>   
> -MODULE_PARM_DESC(vm_block_size, "VM page table size in bits (default 9)");
> +MODULE_PARM_DESC(vm_block_size, "VM page table size in bits (default depending on vm_size)");
>   module_param_named(vm_block_size, radeon_vm_block_size, int, 0444);
>   
>   MODULE_PARM_DESC(deep_color, "Deep Color support (1 = enable, 0 = disable (default))");

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-07-26 13:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 11:55 [PATCH] drm/radeon: adjust default radeon_vm_block_size v2 Christian König
2014-07-26 13:34 ` Christian König [this message]
2014-07-28  3:00   ` Alex Deucher

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=53D3AE4C.60704@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@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 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.