From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: let's use GB for vm_size
Date: Mon, 21 Jul 2014 10:14:51 +0200 [thread overview]
Message-ID: <53CCCBFB.5060801@vodafone.de> (raw)
In-Reply-To: <CADnq5_MNpffCe3JLAzpAoVb4KTi7k_PTuAh=zrLvdVfqMBWayw@mail.gmail.com>
Am 18.07.2014 19:06, schrieb Alex Deucher:
> On Fri, Jul 18, 2014 at 12:10 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Fri, Jul 18, 2014 at 7:56 AM, Christian König
>> <deathsimple@vodafone.de> wrote:
>>> From: Christian König <christian.koenig@amd.com>
>>>
>>> VM sizes smaller than 1GB doesn't make much sense anyway.
>>>
>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Applied to my 3.16 tree.
> Actually there was a small typo. I applied the attached version instead.
Still looks good to me.
Thanks for getting it into 3.16,
Christian.
> Alex
>
>> Alex
>>
>>> ---
>>> drivers/gpu/drm/radeon/radeon_device.c | 14 +++++++-------
>>> drivers/gpu/drm/radeon/radeon_drv.c | 4 ++--
>>> 2 files changed, 9 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
>>> index 03686fa..a8537d7 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_device.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_device.c
>>> @@ -1056,22 +1056,22 @@ static void radeon_check_arguments(struct radeon_device *rdev)
>>> if (!radeon_check_pot_argument(radeon_vm_size)) {
>>> dev_warn(rdev->dev, "VM size (%d) must be a power of 2\n",
>>> radeon_vm_size);
>>> - radeon_vm_size = 4096;
>>> + radeon_vm_size = 4;
>>> }
>>>
>>> - if (radeon_vm_size < 4) {
>>> - dev_warn(rdev->dev, "VM size (%d) to small, min is 4MB\n",
>>> + if (radeon_vm_size < 1) {
>>> + dev_warn(rdev->dev, "VM size (%d) to small, min is 1GB\n",
>>> radeon_vm_size);
>>> - radeon_vm_size = 4096;
>>> + radeon_vm_size = 4;
>>> }
>>>
>>> /*
>>> * Max GPUVM size for Cayman, SI and CI are 40 bits.
>>> */
>>> - if (radeon_vm_size > 1024*1024) {
>>> + if (radeon_vm_size > 1024) {
>>> dev_warn(rdev->dev, "VM size (%d) to large, max is 1TB\n",
>>> radeon_vm_size);
>>> - radeon_vm_size = 4096;
>>> + radeon_vm_size = 4;
>>> }
>>>
>>> /* defines number of bits in page table versus page directory,
>>> @@ -1238,7 +1238,7 @@ int radeon_device_init(struct radeon_device *rdev,
>>> /* Adjust VM size here.
>>> * Max GPUVM size for cayman+ is 40 bits.
>>> */
>>> - rdev->vm_manager.max_pfn = radeon_vm_size << 8;
>>> + rdev->vm_manager.max_pfn = radeon_vm_size << 18;
>>>
>>> /* Set asic functions */
>>> r = radeon_asic_init(rdev);
>>> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
>>> index cb14213..e9e3610 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_drv.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
>>> @@ -173,7 +173,7 @@ int radeon_dpm = -1;
>>> int radeon_aspm = -1;
>>> int radeon_runtime_pm = -1;
>>> int radeon_hard_reset = 0;
>>> -int radeon_vm_size = 4096;
>>> +int radeon_vm_size = 4;
>>> int radeon_vm_block_size = 9;
>>> int radeon_deep_color = 0;
>>>
>>> @@ -243,7 +243,7 @@ module_param_named(runpm, radeon_runtime_pm, int, 0444);
>>> MODULE_PARM_DESC(hard_reset, "PCI config reset (1 = force enable, 0 = disable (default))");
>>> module_param_named(hard_reset, radeon_hard_reset, int, 0444);
>>>
>>> -MODULE_PARM_DESC(vm_size, "VM address space size in megabytes (default 4GB)");
>>> +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)");
>>> --
>>> 1.9.1
>>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2014-07-21 8:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 11:56 [PATCH] drm/radeon: let's use GB for vm_size Christian König
2014-07-18 16:10 ` Alex Deucher
2014-07-18 17:06 ` Alex Deucher
2014-07-21 8:14 ` 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=53CCCBFB.5060801@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 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 NNTP newsgroup(s).