* [PATCH] drm/radeon: don't init gpuvm if accel is disabled
@ 2015-01-28 19:41 Alex Deucher
2015-01-29 7:46 ` Oded Gabbay
0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2015-01-28 19:41 UTC (permalink / raw)
To: dri-devel; +Cc: Alex Deucher, stable
If acceleration is disabled, it does not make sense
to init gpuvm since nothing will use it. Moreover,
if radeon_vm_init() gets called it uses accel to try
and clear the pde tables, etc. which results in a bug.
Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=88786
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/radeon_kms.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 3cf9c1f..60751c1 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -605,14 +605,14 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
return -ENOMEM;
}
- vm = &fpriv->vm;
- r = radeon_vm_init(rdev, vm);
- if (r) {
- kfree(fpriv);
- return r;
- }
-
if (rdev->accel_working) {
+ vm = &fpriv->vm;
+ r = radeon_vm_init(rdev, vm);
+ if (r) {
+ kfree(fpriv);
+ return r;
+ }
+
r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
if (r) {
radeon_vm_fini(rdev, vm);
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
2015-01-28 19:41 [PATCH] drm/radeon: don't init gpuvm if accel is disabled Alex Deucher
@ 2015-01-29 7:46 ` Oded Gabbay
2015-01-29 10:36 ` Christian König
2015-01-29 13:54 ` Deucher, Alexander
0 siblings, 2 replies; 5+ messages in thread
From: Oded Gabbay @ 2015-01-29 7:46 UTC (permalink / raw)
To: Alex Deucher, dri-devel; +Cc: Alex Deucher, stable
On 01/28/2015 09:41 PM, Alex Deucher wrote:
> If acceleration is disabled, it does not make sense
> to init gpuvm since nothing will use it. Moreover,
> if radeon_vm_init() gets called it uses accel to try
> and clear the pde tables, etc. which results in a bug.
>
> Bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=88786
>
> Signed-off-by: Alex Deucher<alexander.deucher@amd.com>
> Cc:stable@vger.kernel.org
Alex,
What is accel ?
Is there a situation where accel is disabled and HSA should work ? e.g. headless
mode ?
If so, we need gpuvm for local memory.
Oded
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
2015-01-29 7:46 ` Oded Gabbay
@ 2015-01-29 10:36 ` Christian König
2015-01-29 13:54 ` Deucher, Alexander
1 sibling, 0 replies; 5+ messages in thread
From: Christian König @ 2015-01-29 10:36 UTC (permalink / raw)
To: Oded Gabbay, Alex Deucher, dri-devel; +Cc: Alex Deucher, stable
Am 29.01.2015 um 08:46 schrieb Oded Gabbay:
>
>
> On 01/28/2015 09:41 PM, Alex Deucher wrote:
>> If acceleration is disabled, it does not make sense
>> to init gpuvm since nothing will use it. Moreover,
>> if radeon_vm_init() gets called it uses accel to try
>> and clear the pde tables, etc. which results in a bug.
>>
>> Bug:
>> https://bugs.freedesktop.org/show_bug.cgi?id=88786
>>
>> Signed-off-by: Alex Deucher<alexander.deucher@amd.com>
>> Cc:stable@vger.kernel.org
Patch is Reviewed-by: Christian König <christian.koenig@amd.com>
> Alex,
> What is accel ?
> Is there a situation where accel is disabled and HSA should work ?
> e.g. headless mode ?
Not really.
Acceleration is disabled mostly because the user forgotten to install
the firmware or we have a rather big bug in the driver and can't get the
CP running.
In that case we still try to provide mode setting to get an error
message on the screen, but everything else won't work.
Regards,
Christian.
>
> If so, we need gpuvm for local memory.
>
> Oded
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
2015-01-29 7:46 ` Oded Gabbay
2015-01-29 10:36 ` Christian König
@ 2015-01-29 13:54 ` Deucher, Alexander
2015-01-29 13:58 ` Oded Gabbay
1 sibling, 1 reply; 5+ messages in thread
From: Deucher, Alexander @ 2015-01-29 13:54 UTC (permalink / raw)
To: Gabbay, Oded, Alex Deucher, dri-devel; +Cc: stable
> -----Original Message-----
> From: Gabbay, Oded
> Sent: Thursday, January 29, 2015 2:46 AM
> To: Alex Deucher; dri-devel@lists.freedesktop.org
> Cc: Deucher, Alexander; stable@vger.kernel.org
> Subject: Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
>
>
>
> On 01/28/2015 09:41 PM, Alex Deucher wrote:
> > If acceleration is disabled, it does not make sense
> > to init gpuvm since nothing will use it. Moreover,
> > if radeon_vm_init() gets called it uses accel to try
> > and clear the pde tables, etc. which results in a bug.
> >
> > Bug:
> > https://bugs.freedesktop.org/show_bug.cgi?id=88786
> >
> > Signed-off-by: Alex Deucher<alexander.deucher@amd.com>
> > Cc:stable@vger.kernel.org
> Alex,
> What is accel ?
If the ring tests fail and for some reason the IPs (e.g., gfx or sdma) are not available, the driver disables acceleration and basically falls back to modesetting only.
> Is there a situation where accel is disabled and HSA should work ? e.g.
> headless
> mode ?
No. We only disable acceleration if we can't get the IPs (gfx, sdma) initialized. Headless has nothing to do with acceleration in this context.
Alex
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
2015-01-29 13:54 ` Deucher, Alexander
@ 2015-01-29 13:58 ` Oded Gabbay
0 siblings, 0 replies; 5+ messages in thread
From: Oded Gabbay @ 2015-01-29 13:58 UTC (permalink / raw)
To: Deucher, Alexander, Alex Deucher, dri-devel; +Cc: stable
On 01/29/2015 03:54 PM, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: Gabbay, Oded
>> Sent: Thursday, January 29, 2015 2:46 AM
>> To: Alex Deucher; dri-devel@lists.freedesktop.org
>> Cc: Deucher, Alexander; stable@vger.kernel.org
>> Subject: Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled
>>
>>
>>
>> On 01/28/2015 09:41 PM, Alex Deucher wrote:
>>> If acceleration is disabled, it does not make sense
>>> to init gpuvm since nothing will use it. Moreover,
>>> if radeon_vm_init() gets called it uses accel to try
>>> and clear the pde tables, etc. which results in a bug.
>>>
>>> Bug:
>>> https://bugs.freedesktop.org/show_bug.cgi?id=88786
>>>
>>> Signed-off-by: Alex Deucher<alexander.deucher@amd.com>
>>> Cc:stable@vger.kernel.org
>> Alex,
>> What is accel ?
>
> If the ring tests fail and for some reason the IPs (e.g., gfx or sdma) are not available, the driver disables acceleration and basically falls back to modesetting only.
>
>> Is there a situation where accel is disabled and HSA should work ? e.g.
>> headless
>> mode ?
>
> No. We only disable acceleration if we can't get the IPs (gfx, sdma) initialized. Headless has nothing to do with acceleration in this context.
>
> Alex
>
OK, thanks for the explanation.
Oded
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-29 13:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 19:41 [PATCH] drm/radeon: don't init gpuvm if accel is disabled Alex Deucher
2015-01-29 7:46 ` Oded Gabbay
2015-01-29 10:36 ` Christian König
2015-01-29 13:54 ` Deucher, Alexander
2015-01-29 13:58 ` Oded Gabbay
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.