[Openchrome-devel] [Bug 94473] DRM / KMS bootup error on VX900 platform

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 18 03:53:09 UTC 2016


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

--- Comment #33 from HuangRan <huangran at iscas.ac.cn> ---
(In reply to Kevin Brace from comment #26)
> Hi Frank,
> 
> I am just wondering.
> Shouldn't DRIVER_MODESET be ORed for driver_features member of drm_driver
> structure inside via_drv.c?
> DRIVER_MODESET identifies the availability of KMS.
> 
> _________________________________________________________________________
> static struct drm_driver via_driver = {
> 	.driver_features = DRIVER_USE_AGP | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED    
>                            | DRIVER_GEM,
> 	.load = via_driver_load,
> 	.unload = via_driver_unload,
> 	.preclose = via_reclaim_buffers_locked,
> 	.context_dtor = via_final_context,
> 	.get_vblank_counter = drm_vblank_count,
> 	.enable_vblank = via_enable_vblank,
> 	.disable_vblank = via_disable_vblank,
> 	.irq_preinstall = via_driver_irq_preinstall,
> 	.irq_postinstall = via_driver_irq_postinstall,
> 	.irq_uninstall = via_driver_irq_uninstall,
> 	.irq_handler = via_driver_irq_handler,
> 	.dma_quiescent = via_driver_dma_quiescent,
> 	.lastclose = via_driver_lastclose,
> 	.set_busid = drm_pci_set_busid,
> 	.gem_open_object = ttm_gem_open_object,
> 	.gem_free_object = ttm_gem_free_object,
> 	.dumb_create = via_dumb_create,
> 	.dumb_map_offset = via_dumb_mmap,
> 	.dumb_destroy = gem_dumb_destroy,
> 	.ioctls = via_ioctls,
> 	.fops = &via_driver_fops,
> 	.name = DRIVER_NAME,
> 	.desc = DRIVER_DESC,
> 	.date = DRIVER_DATE,
> 	.major = DRIVER_MAJOR,
> 	.minor = DRIVER_MINOR,
> 	.patchlevel = DRIVER_PATCHLEVEL,
> };
> _________________________________________________________________________
> 
> 
> I got this idea from this section of the DRM development guide.
> 
> http://free-electrons.com/kerneldoc//latest/DocBook/gpu/drmInternals.html#id-
> 1.3.4.5.4

Hi Kevin, 

  Yup, you are right. So you can see in via_drv.c file, function via_init()
will OR this value to make kernel driver to be KMS mode. For general linux
kernel, there is no such flag which will make KMS disabled in kernel. And DDX
will check this value by drmCheckModesettingSupported() call. you can see
/sys/bus/pci/devices/0000:00:01.0, there is an drm/ControlD64 directory which
is registered by drm module. If DRIVER_MODESET is ORed by via.ko, DDX will
recognize KMS enabled by drmCheckModesettingSupported() call with "ControlD"
flag.

Thanks,
Frank

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/openchrome-devel/attachments/20160318/94f00d9e/attachment.html>


More information about the Openchrome-devel mailing list