svn commit: r259261 - head/sys/dev/drm2
Konstantin Belousov
kostikbel at gmail.com
Sat Dec 14 11:27:22 UTC 2013
On Sat, Dec 14, 2013 at 12:11:01AM +0200, Aleksandr Rybalko wrote:
> Konstantin Belousov <kostikbel at gmail.com> написав(ла):
> >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote:
> >> Author: ray
> >> Date: Thu Dec 12 14:49:26 2013
> >> New Revision: 259261
> >> URL: http://svnweb.freebsd.org/changeset/base/259261
> >>
> >> Log:
> >> Do not try to probe/attach if attempt to add fbd child are failed.
> >>
> >> Sponsored by: The FreeBSD Foundation
> >>
> >> Modified:
> >> head/sys/dev/drm2/drm_fb_helper.c
> >>
> >> Modified: head/sys/dev/drm2/drm_fb_helper.c
> >>
> >==============================================================================
> >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25
> >2013 (r259260)
> >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26
> >2013 (r259261)
> >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct
> >>
> >> kdev = fb_helper->dev->device;
> >> fbd = device_add_child(kdev, "fbd", device_get_unit(kdev));
> >> - ret = device_probe_and_attach(fbd);
> >> + if (fbd != NULL)
> >> + ret = device_probe_and_attach(fbd);
> >> + else
> >> + ret = ENODEV;
> >This must be -ENODEV, since linux layer operates on negative values for
> >error. The error is negated in the drm layer, which would result in
> >non-existent errno returned to FreeBSD code.
>
> It is not actually return code, but only value to show in error message few lines later. ENODEV just value for case no device attached.
> That error message appear only if kernel configuration include device vt. (planning for syscons too, maybe).
Ok.
I looked around some more, and I think that the call to
drm_fb_helper_set_par() is required to properly initialize crtc.
See the #ifdef-ed Linux code.
>
> >
> >Also, the #ifdef __FreeBSD braces in the file are not useful, please
> >remove them.
> >> #ifdef DEV_VT
> >> if (ret != 0)
> >> DRM_ERROR("Failed to attach fbd device: %d\n", ret);
>
> Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over whole DRM2 code, to reduce differences with linux code?
>
The #ifdefs should be removed.
The removal would not reduce difference with the upstream, but this is not
the point anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131214/007abe80/attachment.sig>
More information about the svn-src-head
mailing list