[PATCH] drm/radeon: only init fbdev if we have connectors

Alex Deucher alexdeucher at gmail.com
Mon Jan 25 21:34:10 PST 2016


On Mon, Jan 25, 2016 at 7:49 PM, Rob Clark <robdclark at gmail.com> wrote:
> from a quick look, I think so..
>
> It was something I ran across on an older kernel which didn't have
> amdgpu, but I don't see anything obvious that would cause
> drm_fb_helper_init() to be skipped in amdgpu if there are no
> connectors..  (but nouveau seems to check for
> dev->mode_config.num_crtc, for (I assume) similar reasons)

We don't enable fbdev on amdgpu if the chip in question has no display
block, but we still could enable it if the chip has a display block,
but no connectors.  The same may be true in nouveau so the check for
num_crtc may not be enough.  Attached patch should rectify that.

Alex


>
> BR,
> -R
>
> On Mon, Jan 25, 2016 at 6:57 PM, Mike Lothian <mike at fireburn.co.uk> wrote:
>> Is something similar required for AMDGPU too?
>>
>> On Mon, 25 Jan 2016 at 23:06 Rob Clark <robdclark at gmail.com> wrote:
>>>
>>> This fixes an issue that was noticed on an optimus/prime laptop with
>>> a kernel that was old enough to not support the integrated intel gfx
>>> (which was driving all the outputs), but did have support for the
>>> discrete radeon gpu.  The end result was not falling back to VESA and
>>> leaving the user with a black screen.
>>>
>>> (Plus it is kind of silly to create an framebuffer device if there
>>> are no outputs hooked up to the gpu.)
>>>
>>> Signed-off-by: Rob Clark <robdclark at gmail.com>
>>> ---
>>>  drivers/gpu/drm/radeon/radeon_display.c | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_display.c
>>> b/drivers/gpu/drm/radeon/radeon_display.c
>>> index 1eca0ac..f8e776c 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_display.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_display.c
>>> @@ -1670,8 +1670,10 @@ int radeon_modeset_init(struct radeon_device *rdev)
>>>         /* setup afmt */
>>>         radeon_afmt_init(rdev);
>>>
>>> -       radeon_fbdev_init(rdev);
>>> -       drm_kms_helper_poll_init(rdev->ddev);
>>> +       if (!list_empty(&rdev->ddev->mode_config.connector_list)) {
>>> +               radeon_fbdev_init(rdev);
>>> +               drm_kms_helper_poll_init(rdev->ddev);
>>> +       }
>>>
>>>         /* do pm late init */
>>>         ret = radeon_pm_late_init(rdev);
>>> --
>>> 2.5.0
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-amdgpu-don-t-init-fbdev-if-we-don-t-have-any-con.patch
Type: text/x-diff
Size: 1236 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20160126/29ac9a86/attachment.patch>


More information about the dri-devel mailing list