diff mbox

[1/3] drm: add helper to check for wc memory support

Message ID 1454133574-20527-1-git-send-email-oded.gabbay@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oded Gabbay Jan. 30, 2016, 5:59 a.m. UTC
From: Dave Airlie <airlied@redhat.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
 include/drm/drm_cache.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Christian König Jan. 30, 2016, 9:57 a.m. UTC | #1
Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
> From: Dave Airlie <airlied@redhat.com>
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

With the minor issues Michel noted fixed this series is Reviewed-by: 
Christian König <christian.koenig@amd.com> as well.

> ---
>   include/drm/drm_cache.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
> index 7bfb063..461a055 100644
> --- a/include/drm/drm_cache.h
> +++ b/include/drm/drm_cache.h
> @@ -35,4 +35,13 @@
>   
>   void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>   
> +static inline bool drm_arch_can_wc_memory(void)
> +{
> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
> +	return false;
> +#else
> +	return true;
> +#endif
> +}
> +
>   #endif
Alex Deucher Feb. 1, 2016, 5:01 p.m. UTC | #2
On Sat, Jan 30, 2016 at 4:57 AM, Christian König
<deathsimple@vodafone.de> wrote:
> Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
>>
>> From: Dave Airlie <airlied@redhat.com>
>>
>> Signed-off-by: Dave Airlie <airlied@redhat.com>
>> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
>
>
> With the minor issues Michel noted fixed this series is Reviewed-by:
> Christian König <christian.koenig@amd.com> as well.

Applied with the comments fixed up.  Thanks!

Alex

>
>
>> ---
>>   include/drm/drm_cache.h | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
>> index 7bfb063..461a055 100644
>> --- a/include/drm/drm_cache.h
>> +++ b/include/drm/drm_cache.h
>> @@ -35,4 +35,13 @@
>>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>>   +static inline bool drm_arch_can_wc_memory(void)
>> +{
>> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
>> +       return false;
>> +#else
>> +       return true;
>> +#endif
>> +}
>> +
>>   #endif
>
>
Oded Gabbay Feb. 2, 2016, 12:01 p.m. UTC | #3
On Mon, Feb 1, 2016 at 7:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>
> On Sat, Jan 30, 2016 at 4:57 AM, Christian König
> <deathsimple@vodafone.de> wrote:
> > Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
> >>
> >> From: Dave Airlie <airlied@redhat.com>
> >>
> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
> >> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
> >
> >
> > With the minor issues Michel noted fixed this series is Reviewed-by:
> > Christian König <christian.koenig@amd.com> as well.
>
> Applied with the comments fixed up.  Thanks!
>
> Alex
>

Hi Alex,
Could you please add stable tag ? I forgot to add them.
Thanks,

       Oded


>
> >
> >
> >> ---
> >>   include/drm/drm_cache.h | 9 +++++++++
> >>   1 file changed, 9 insertions(+)
> >>
> >> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
> >> index 7bfb063..461a055 100644
> >> --- a/include/drm/drm_cache.h
> >> +++ b/include/drm/drm_cache.h
> >> @@ -35,4 +35,13 @@
> >>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
> >>   +static inline bool drm_arch_can_wc_memory(void)
> >> +{
> >> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
> >> +       return false;
> >> +#else
> >> +       return true;
> >> +#endif
> >> +}
> >> +
> >>   #endif
> >
> >
Alex Deucher Feb. 2, 2016, 3:07 p.m. UTC | #4
On Tue, Feb 2, 2016 at 7:01 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> On Mon, Feb 1, 2016 at 7:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> On Sat, Jan 30, 2016 at 4:57 AM, Christian König
>> <deathsimple@vodafone.de> wrote:
>> > Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
>> >>
>> >> From: Dave Airlie <airlied@redhat.com>
>> >>
>> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
>> >> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
>> >
>> >
>> > With the minor issues Michel noted fixed this series is Reviewed-by:
>> > Christian König <christian.koenig@amd.com> as well.
>>
>> Applied with the comments fixed up.  Thanks!
>>
>> Alex
>>
>
> Hi Alex,
> Could you please add stable tag ? I forgot to add them.

Will do.

Alex

> Thanks,
>
>        Oded
>
>
>>
>> >
>> >
>> >> ---
>> >>   include/drm/drm_cache.h | 9 +++++++++
>> >>   1 file changed, 9 insertions(+)
>> >>
>> >> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
>> >> index 7bfb063..461a055 100644
>> >> --- a/include/drm/drm_cache.h
>> >> +++ b/include/drm/drm_cache.h
>> >> @@ -35,4 +35,13 @@
>> >>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>> >>   +static inline bool drm_arch_can_wc_memory(void)
>> >> +{
>> >> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
>> >> +       return false;
>> >> +#else
>> >> +       return true;
>> >> +#endif
>> >> +}
>> >> +
>> >>   #endif
>> >
>> >
Oded Gabbay Feb. 3, 2016, 8:17 a.m. UTC | #5
On Tue, Feb 2, 2016 at 5:07 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Tue, Feb 2, 2016 at 7:01 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>> On Mon, Feb 1, 2016 at 7:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>>
>>> On Sat, Jan 30, 2016 at 4:57 AM, Christian König
>>> <deathsimple@vodafone.de> wrote:
>>> > Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
>>> >>
>>> >> From: Dave Airlie <airlied@redhat.com>
>>> >>
>>> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
>>> >> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
>>> >
>>> >
>>> > With the minor issues Michel noted fixed this series is Reviewed-by:
>>> > Christian König <christian.koenig@amd.com> as well.
>>>
>>> Applied with the comments fixed up.  Thanks!
>>>
>>> Alex
>>>
>>
>> Hi Alex,
>> Could you please add stable tag ? I forgot to add them.
>
> Will do.
>
> Alex

Thanks.

Alex,
I saw you put the patches into your drm-next-4.6.
As these are fixes, any chance you could instead put them to
drm-fixes-4.5 ? for -rc3/4 ?

Oded

>
>> Thanks,
>>
>>        Oded
>>
>>
>>>
>>> >
>>> >
>>> >> ---
>>> >>   include/drm/drm_cache.h | 9 +++++++++
>>> >>   1 file changed, 9 insertions(+)
>>> >>
>>> >> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
>>> >> index 7bfb063..461a055 100644
>>> >> --- a/include/drm/drm_cache.h
>>> >> +++ b/include/drm/drm_cache.h
>>> >> @@ -35,4 +35,13 @@
>>> >>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>>> >>   +static inline bool drm_arch_can_wc_memory(void)
>>> >> +{
>>> >> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
>>> >> +       return false;
>>> >> +#else
>>> >> +       return true;
>>> >> +#endif
>>> >> +}
>>> >> +
>>> >>   #endif
>>> >
>>> >
Alex Deucher Feb. 3, 2016, 1:53 p.m. UTC | #6
On Wed, Feb 3, 2016 at 3:17 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> On Tue, Feb 2, 2016 at 5:07 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Tue, Feb 2, 2016 at 7:01 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>> On Mon, Feb 1, 2016 at 7:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>>>
>>>> On Sat, Jan 30, 2016 at 4:57 AM, Christian König
>>>> <deathsimple@vodafone.de> wrote:
>>>> > Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
>>>> >>
>>>> >> From: Dave Airlie <airlied@redhat.com>
>>>> >>
>>>> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
>>>> >> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
>>>> >
>>>> >
>>>> > With the minor issues Michel noted fixed this series is Reviewed-by:
>>>> > Christian König <christian.koenig@amd.com> as well.
>>>>
>>>> Applied with the comments fixed up.  Thanks!
>>>>
>>>> Alex
>>>>
>>>
>>> Hi Alex,
>>> Could you please add stable tag ? I forgot to add them.
>>
>> Will do.
>>
>> Alex
>
> Thanks.
>
> Alex,
> I saw you put the patches into your drm-next-4.6.
> As these are fixes, any chance you could instead put them to
> drm-fixes-4.5 ? for -rc3/4 ?

They'll be in my -fixes pull this week.  I put them in my 4.6-wip tree
for additional testing.

Alex

>
> Oded
>
>>
>>> Thanks,
>>>
>>>        Oded
>>>
>>>
>>>>
>>>> >
>>>> >
>>>> >> ---
>>>> >>   include/drm/drm_cache.h | 9 +++++++++
>>>> >>   1 file changed, 9 insertions(+)
>>>> >>
>>>> >> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
>>>> >> index 7bfb063..461a055 100644
>>>> >> --- a/include/drm/drm_cache.h
>>>> >> +++ b/include/drm/drm_cache.h
>>>> >> @@ -35,4 +35,13 @@
>>>> >>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>>>> >>   +static inline bool drm_arch_can_wc_memory(void)
>>>> >> +{
>>>> >> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
>>>> >> +       return false;
>>>> >> +#else
>>>> >> +       return true;
>>>> >> +#endif
>>>> >> +}
>>>> >> +
>>>> >>   #endif
>>>> >
>>>> >
Oded Gabbay Feb. 3, 2016, 2 p.m. UTC | #7
On Wed, Feb 3, 2016 at 3:53 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Wed, Feb 3, 2016 at 3:17 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>> On Tue, Feb 2, 2016 at 5:07 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>> On Tue, Feb 2, 2016 at 7:01 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>>> On Mon, Feb 1, 2016 at 7:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>>>>
>>>>> On Sat, Jan 30, 2016 at 4:57 AM, Christian König
>>>>> <deathsimple@vodafone.de> wrote:
>>>>> > Am 30.01.2016 um 06:59 schrieb Oded Gabbay:
>>>>> >>
>>>>> >> From: Dave Airlie <airlied@redhat.com>
>>>>> >>
>>>>> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
>>>>> >> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
>>>>> >
>>>>> >
>>>>> > With the minor issues Michel noted fixed this series is Reviewed-by:
>>>>> > Christian König <christian.koenig@amd.com> as well.
>>>>>
>>>>> Applied with the comments fixed up.  Thanks!
>>>>>
>>>>> Alex
>>>>>
>>>>
>>>> Hi Alex,
>>>> Could you please add stable tag ? I forgot to add them.
>>>
>>> Will do.
>>>
>>> Alex
>>
>> Thanks.
>>
>> Alex,
>> I saw you put the patches into your drm-next-4.6.
>> As these are fixes, any chance you could instead put them to
>> drm-fixes-4.5 ? for -rc3/4 ?
>
> They'll be in my -fixes pull this week.  I put them in my 4.6-wip tree
> for additional testing.
>
> Alex
>
ah, great.
Thanks again
Oded

>>
>> Oded
>>
>>>
>>>> Thanks,
>>>>
>>>>        Oded
>>>>
>>>>
>>>>>
>>>>> >
>>>>> >
>>>>> >> ---
>>>>> >>   include/drm/drm_cache.h | 9 +++++++++
>>>>> >>   1 file changed, 9 insertions(+)
>>>>> >>
>>>>> >> diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
>>>>> >> index 7bfb063..461a055 100644
>>>>> >> --- a/include/drm/drm_cache.h
>>>>> >> +++ b/include/drm/drm_cache.h
>>>>> >> @@ -35,4 +35,13 @@
>>>>> >>     void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
>>>>> >>   +static inline bool drm_arch_can_wc_memory(void)
>>>>> >> +{
>>>>> >> +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
>>>>> >> +       return false;
>>>>> >> +#else
>>>>> >> +       return true;
>>>>> >> +#endif
>>>>> >> +}
>>>>> >> +
>>>>> >>   #endif
>>>>> >
>>>>> >
diff mbox

Patch

diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
index 7bfb063..461a055 100644
--- a/include/drm/drm_cache.h
+++ b/include/drm/drm_cache.h
@@ -35,4 +35,13 @@ 
 
 void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
 
+static inline bool drm_arch_can_wc_memory(void)
+{
+#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
+	return false;
+#else
+	return true;
+#endif
+}
+
 #endif