Bug 112211

Summary: ATI Radeon Graphics not rendering correctly
Product: Memory Management Reporter: Stuart Foster (smf-linux)
Component: Page AllocatorAssignee: Andrew Morton (akpm)
Status: NEW ---    
Severity: normal CC: szg00000
Priority: P1    
Hardware: IA-32   
OS: Linux   
Kernel Version: Linux 4.5-rc3 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
Kernel config file

Description Stuart Foster 2016-02-09 08:41:39 UTC
On testing linux 4.5-rc( 1,2 and 3) I have found that my display is not rendered correctly on starting the X server. My screen is mainly black with portions of the desktop appearing from time to time. I initially raised this with the DRM/Radeon team:

https://bugs.freedesktop.org/show_bug.cgi?id=93998

On investigation a bisect identified the following commit as the source of my problem:

01c8f1c44b83a0825b573e7c723b033cece37b86 is the first bad commit
commit 01c8f1c44b83a0825b573e7c723b033cece37b86
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Fri Jan 15 16:56:40 2016 -0800

    mm, dax, gpu: convert vm_insert_mixed to pfn_t
    
    Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of
    evaluating the PFN_MAP and PFN_DEV flags.  When both are set it triggers
    _PAGE_DEVMAP to be set in the resulting pte.
    
    There are no functional changes to the gpu drivers as a result of this
    conversion.
    
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Cc: Dave Hansen <dave@sr71.net>
    Cc: David Airlie <airlied@linux.ie>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

The problem is present on two AMD/ATI systems I have tried but is absent from my Intel based laptop. All my systems are 32 bit LFS builds.

I did try to contact Dan Williams but I am not sure that my e-mail got through, can anyone suggest a way forward please ?
Comment 1 Stuart Foster 2016-02-09 08:48:59 UTC
Created attachment 203171 [details]
dmesg

dmesg output from Linux-4.5-rc3 for reference.
Comment 2 Andrew Morton 2016-02-09 20:20:20 UTC
(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Tue, 09 Feb 2016 08:41:39 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=112211
> 
>             Bug ID: 112211
>            Summary: ATI Radeon Graphics not rendering correctly
>            Product: Memory Management
>            Version: 2.5
>     Kernel Version: Linux 4.5-rc3
>           Hardware: IA-32
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Page Allocator
>           Assignee: akpm@linux-foundation.org
>           Reporter: smf.linux@ntlworld.com
>         Regression: No
> 
> On testing linux 4.5-rc( 1,2 and 3) I have found that my display is not
> rendered correctly on starting the X server. My screen is mainly black with
> portions of the desktop appearing from time to time. I initially raised this
> with the DRM/Radeon team:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=93998
> 
> On investigation a bisect identified the following commit as the source of my
> problem:
> 
> 01c8f1c44b83a0825b573e7c723b033cece37b86 is the first bad commit
> commit 01c8f1c44b83a0825b573e7c723b033cece37b86
> Author: Dan Williams <dan.j.williams@intel.com>
> Date:   Fri Jan 15 16:56:40 2016 -0800
> 
>     mm, dax, gpu: convert vm_insert_mixed to pfn_t
> 
>     Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of
>     evaluating the PFN_MAP and PFN_DEV flags.  When both are set it triggers
>     _PAGE_DEVMAP to be set in the resulting pte.
> 
>     There are no functional changes to the gpu drivers as a result of this
>     conversion.
> 
>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>     Cc: Dave Hansen <dave@sr71.net>
>     Cc: David Airlie <airlied@linux.ie>
>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> 
> The problem is present on two AMD/ATI systems I have tried but is absent from
> my Intel based laptop. All my systems are 32 bit LFS builds.
> 
> I did try to contact Dan Williams but I am not sure that my e-mail got
> through,
> can anyone suggest a way forward please ?
> 

Does your kernel include

commit 03fc2da63b9a33dce784a2075c7e068bb97cbf69
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Tue Jan 26 09:48:05 2016 -0800

    mm: fix pfn_t to page conversion in vm_insert_mixed
Comment 3 Dan Williams 2016-02-09 20:36:36 UTC
On Tue, Feb 9, 2016 at 12:20 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
>
> On Tue, 09 Feb 2016 08:41:39 +0000 bugzilla-daemon@bugzilla.kernel.org wrote:
>
>> https://bugzilla.kernel.org/show_bug.cgi?id=112211
>>
>>             Bug ID: 112211
>>            Summary: ATI Radeon Graphics not rendering correctly
>>            Product: Memory Management
>>            Version: 2.5
>>     Kernel Version: Linux 4.5-rc3
>>           Hardware: IA-32
>>                 OS: Linux
>>               Tree: Mainline
>>             Status: NEW
>>           Severity: normal
>>           Priority: P1
>>          Component: Page Allocator
>>           Assignee: akpm@linux-foundation.org
>>           Reporter: smf.linux@ntlworld.com
>>         Regression: No
>>
>> On testing linux 4.5-rc( 1,2 and 3) I have found that my display is not
>> rendered correctly on starting the X server. My screen is mainly black with
>> portions of the desktop appearing from time to time. I initially raised this
>> with the DRM/Radeon team:
>>
>> https://bugs.freedesktop.org/show_bug.cgi?id=93998
>>
>> On investigation a bisect identified the following commit as the source of
>> my
>> problem:
>>
>> 01c8f1c44b83a0825b573e7c723b033cece37b86 is the first bad commit
>> commit 01c8f1c44b83a0825b573e7c723b033cece37b86
>> Author: Dan Williams <dan.j.williams@intel.com>
>> Date:   Fri Jan 15 16:56:40 2016 -0800
>>
>>     mm, dax, gpu: convert vm_insert_mixed to pfn_t
>>
>>     Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of
>>     evaluating the PFN_MAP and PFN_DEV flags.  When both are set it triggers
>>     _PAGE_DEVMAP to be set in the resulting pte.
>>
>>     There are no functional changes to the gpu drivers as a result of this
>>     conversion.
>>
>>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>>     Cc: Dave Hansen <dave@sr71.net>
>>     Cc: David Airlie <airlied@linux.ie>
>>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
>>
>> The problem is present on two AMD/ATI systems I have tried but is absent
>> from
>> my Intel based laptop. All my systems are 32 bit LFS builds.
>>
>> I did try to contact Dan Williams but I am not sure that my e-mail got
>> through,
>> can anyone suggest a way forward please ?
>>
>
> Does your kernel include
>
> commit 03fc2da63b9a33dce784a2075c7e068bb97cbf69
> Author: Dan Williams <dan.j.williams@intel.com>
> Date:   Tue Jan 26 09:48:05 2016 -0800
>
>     mm: fix pfn_t to page conversion in vm_insert_mixed
>

Hi Stuart, from the bugzilla activity it looks like you are already
running with this fix.  Can you append you kernel config file to the
bugzilla.  There's something particular about 32-bit builds I'm
missing...
Comment 4 Stuart Foster 2016-02-09 21:18:14 UTC
Created attachment 203241 [details]
Kernel config file

Upgraded .config file from 4.4.1 via make oldconfig for 4.5-rc3
Comment 5 Dan Williams 2016-02-11 02:21:58 UTC
On Tue, Feb 9, 2016 at 12:36 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> On Tue, Feb 9, 2016 at 12:20 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
>>
>> (switched to email.  Please respond via emailed reply-to-all, not via the
>> bugzilla web interface).
>>
>> On Tue, 09 Feb 2016 08:41:39 +0000 bugzilla-daemon@bugzilla.kernel.org
>> wrote:
>>
>>> https://bugzilla.kernel.org/show_bug.cgi?id=112211
>>>
>>>             Bug ID: 112211
>>>            Summary: ATI Radeon Graphics not rendering correctly
>>>            Product: Memory Management
>>>            Version: 2.5
>>>     Kernel Version: Linux 4.5-rc3
>>>           Hardware: IA-32
>>>                 OS: Linux
>>>               Tree: Mainline
>>>             Status: NEW
>>>           Severity: normal
>>>           Priority: P1
>>>          Component: Page Allocator
>>>           Assignee: akpm@linux-foundation.org
>>>           Reporter: smf.linux@ntlworld.com
>>>         Regression: No
>>>
>>> On testing linux 4.5-rc( 1,2 and 3) I have found that my display is not
>>> rendered correctly on starting the X server. My screen is mainly black with
>>> portions of the desktop appearing from time to time. I initially raised
>>> this
>>> with the DRM/Radeon team:
>>>
>>> https://bugs.freedesktop.org/show_bug.cgi?id=93998
>>>
>>> On investigation a bisect identified the following commit as the source of
>>> my
>>> problem:
>>>
>>> 01c8f1c44b83a0825b573e7c723b033cece37b86 is the first bad commit
>>> commit 01c8f1c44b83a0825b573e7c723b033cece37b86
>>> Author: Dan Williams <dan.j.williams@intel.com>
>>> Date:   Fri Jan 15 16:56:40 2016 -0800
>>>
>>>     mm, dax, gpu: convert vm_insert_mixed to pfn_t
>>>
>>>     Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose
>>>     of
>>>     evaluating the PFN_MAP and PFN_DEV flags.  When both are set it
>>>     triggers
>>>     _PAGE_DEVMAP to be set in the resulting pte.
>>>
>>>     There are no functional changes to the gpu drivers as a result of this
>>>     conversion.
>>>
>>>     Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>>>     Cc: Dave Hansen <dave@sr71.net>
>>>     Cc: David Airlie <airlied@linux.ie>
>>>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>>>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
>>>
>>> The problem is present on two AMD/ATI systems I have tried but is absent
>>> from
>>> my Intel based laptop. All my systems are 32 bit LFS builds.
>>>
>>> I did try to contact Dan Williams but I am not sure that my e-mail got
>>> through,
>>> can anyone suggest a way forward please ?
>>>
>>
>> Does your kernel include
>>
>> commit 03fc2da63b9a33dce784a2075c7e068bb97cbf69
>> Author: Dan Williams <dan.j.williams@intel.com>
>> Date:   Tue Jan 26 09:48:05 2016 -0800
>>
>>     mm: fix pfn_t to page conversion in vm_insert_mixed
>>
>
> Hi Stuart, from the bugzilla activity it looks like you are already
> running with this fix.  Can you append you kernel config file to the
> bugzilla.  There's something particular about 32-bit builds I'm
> missing...

Thanks for the config file.  I was able to reproduce this in a VM that
uses the DRM layer.  The fix that works for me is available here in
patchwork [1].  Let me know if it works in your environment.

[1]: https://patchwork.kernel.org/patch/8276171/
Comment 6 Stuart Foster 2016-02-11 17:18:25 UTC
Dan,

I have tested both my AMD/ATI systems and my Intel laptop with the patch applied and all three work correctly.

Thanks :)