* [PATCH] drm/radeon: Don't try to enable write-combining without PAT
@ 2015-02-04 1:19 Michel Dänzer
2015-02-04 9:49 ` Christian König
0 siblings, 1 reply; 4+ messages in thread
From: Michel Dänzer @ 2015-02-04 1:19 UTC (permalink / raw)
To: dri-devel
From: Michel Dänzer <michel.daenzer@amd.com>
Doing so can cause things to become slow.
Print a warning at compile time and an informative message at runtime in
that case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88758
Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
drivers/gpu/drm/radeon/radeon_object.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 7d68223..bd3df10 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -238,6 +238,18 @@ int radeon_bo_create(struct radeon_device *rdev,
* See https://bugs.freedesktop.org/show_bug.cgi?id=84627
*/
bo->flags &= ~RADEON_GEM_GTT_WC;
+#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
+ /* Don't try to enable write-combining when it can't work, or things
+ * may be slow
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=88758
+ */
+
+#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \
+ thanks to write-combining
+
+ DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
+ "better performance thanks to write-combining\n");
+ bo->flags &= ~RADEON_GEM_GTT_WC;
#endif
radeon_ttm_placement_from_domain(bo, domain);
--
2.1.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm/radeon: Don't try to enable write-combining without PAT
2015-02-04 1:19 [PATCH] drm/radeon: Don't try to enable write-combining without PAT Michel Dänzer
@ 2015-02-04 9:49 ` Christian König
2015-02-04 22:37 ` Alex Deucher
2015-02-05 1:08 ` Michel Dänzer
0 siblings, 2 replies; 4+ messages in thread
From: Christian König @ 2015-02-04 9:49 UTC (permalink / raw)
To: Michel Dänzer, dri-devel
Am 04.02.2015 um 02:19 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Doing so can cause things to become slow.
>
> Print a warning at compile time and an informative message at runtime in
> that case.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88758
> Cc: stable@vger.kernel.org
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Interesting I wonder what the rational behind this is. I mean
CONFIG_X86_PAT will obviously affect write combining, but why does it
slow down things if we request something that the kernel isn't
configured for?
Anyway, patch is Reviewed-by: Christian König <christian.koenig@amd.com>
Regards,
Christian.
> ---
> drivers/gpu/drm/radeon/radeon_object.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 7d68223..bd3df10 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -238,6 +238,18 @@ int radeon_bo_create(struct radeon_device *rdev,
> * See https://bugs.freedesktop.org/show_bug.cgi?id=84627
> */
> bo->flags &= ~RADEON_GEM_GTT_WC;
> +#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
> + /* Don't try to enable write-combining when it can't work, or things
> + * may be slow
> + * See https://bugs.freedesktop.org/show_bug.cgi?id=88758
> + */
> +
> +#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \
> + thanks to write-combining
> +
> + DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
> + "better performance thanks to write-combining\n");
> + bo->flags &= ~RADEON_GEM_GTT_WC;
> #endif
>
> radeon_ttm_placement_from_domain(bo, domain);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/radeon: Don't try to enable write-combining without PAT
2015-02-04 9:49 ` Christian König
@ 2015-02-04 22:37 ` Alex Deucher
2015-02-05 1:08 ` Michel Dänzer
1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2015-02-04 22:37 UTC (permalink / raw)
To: Christian König; +Cc: Michel Dänzer, Maling list - DRI developers
On Wed, Feb 4, 2015 at 4:49 AM, Christian König <deathsimple@vodafone.de> wrote:
> Am 04.02.2015 um 02:19 schrieb Michel Dänzer:
>>
>> From: Michel Dänzer <michel.daenzer@amd.com>
>>
>> Doing so can cause things to become slow.
>>
>> Print a warning at compile time and an informative message at runtime in
>> that case.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88758
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
>
>
> Interesting I wonder what the rational behind this is. I mean CONFIG_X86_PAT
> will obviously affect write combining, but why does it slow down things if
> we request something that the kernel isn't configured for?
>
> Anyway, patch is Reviewed-by: Christian König <christian.koenig@amd.com>
Applied to my 3.20 tree.
Thanks!
Alex
>
> Regards,
> Christian.
>
>
>> ---
>> drivers/gpu/drm/radeon/radeon_object.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_object.c
>> b/drivers/gpu/drm/radeon/radeon_object.c
>> index 7d68223..bd3df10 100644
>> --- a/drivers/gpu/drm/radeon/radeon_object.c
>> +++ b/drivers/gpu/drm/radeon/radeon_object.c
>> @@ -238,6 +238,18 @@ int radeon_bo_create(struct radeon_device *rdev,
>> * See https://bugs.freedesktop.org/show_bug.cgi?id=84627
>> */
>> bo->flags &= ~RADEON_GEM_GTT_WC;
>> +#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
>> + /* Don't try to enable write-combining when it can't work, or
>> things
>> + * may be slow
>> + * See https://bugs.freedesktop.org/show_bug.cgi?id=88758
>> + */
>> +
>> +#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better
>> performance \
>> + thanks to write-combining
>> +
>> + DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
>> + "better performance thanks to write-combining\n");
>> + bo->flags &= ~RADEON_GEM_GTT_WC;
>> #endif
>> radeon_ttm_placement_from_domain(bo, domain);
>
>
> _______________________________________________
> 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] 4+ messages in thread* Re: [PATCH] drm/radeon: Don't try to enable write-combining without PAT
2015-02-04 9:49 ` Christian König
2015-02-04 22:37 ` Alex Deucher
@ 2015-02-05 1:08 ` Michel Dänzer
1 sibling, 0 replies; 4+ messages in thread
From: Michel Dänzer @ 2015-02-05 1:08 UTC (permalink / raw)
To: Christian König; +Cc: dri-devel
On 04.02.2015 18:49, Christian König wrote:
> Am 04.02.2015 um 02:19 schrieb Michel Dänzer:
>> From: Michel Dänzer <michel.daenzer@amd.com>
>>
>> Doing so can cause things to become slow.
>>
>> Print a warning at compile time and an informative message at runtime in
>> that case.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88758
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
>
> Interesting I wonder what the rational behind this is. I mean
> CONFIG_X86_PAT will obviously affect write combining, but why does it
> slow down things if we request something that the kernel isn't
> configured for?
Yeah, I'm not sure exactly what happens in that case, but I don't care
too much, since PAT is clearly desirable anyway.
> Anyway, patch is Reviewed-by: Christian König <christian.koenig@amd.com>
Thanks!
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-05 1:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 1:19 [PATCH] drm/radeon: Don't try to enable write-combining without PAT Michel Dänzer
2015-02-04 9:49 ` Christian König
2015-02-04 22:37 ` Alex Deucher
2015-02-05 1:08 ` Michel Dänzer
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.