On Wed, Nov 30, 2016 at 05:36:46PM +0200, Laurent Pinchart wrote:
Hi Benjamin,
On Wednesday 30 Nov 2016 16:34:37 Benjamin Gaignard wrote:
2016-11-30 16:19 GMT+01:00 Laurent Pinchart:
On Wednesday 30 Nov 2016 16:08:23 Benjamin Gaignard wrote:
2016-11-30 14:52 GMT+01:00 Daniel Vetter daniel@ffwll.ch:
On Wed, Nov 30, 2016 at 12:21:24PM +0100, Benjamin Gaignard wrote:
Some platforms without MMU have display drivers where a drm/kms driver could be implemented. Before doing such kind of thing drm/kms must allow to use mmuless devices. This patch proposes to remove MMU configuration flag and add some cma helpers functions to help implementing mmuless display driver
Signed-off-by: Benjamin Gaignard benjamin.gaignard@linaro.org
drivers/gpu/drm/Kconfig | 4 +-- drivers/gpu/drm/drm_fb_cma_helper.c | 20 ++++++++++++ drivers/gpu/drm/drm_gem_cma_helper.c | 62 +++++++++++++++++++++++++++
[snip]
drm_vm.c is a legacy horror show. Instead of hacking even more garbage into this, can't we just not compile this for MMU-less platforms? A bunch of stubs in drm_internal.h is all that should be needed for this, since on MMU-less you should never be able to enable one of the legacy drivers which need the exported symbols from this file.
Following your advice I have removed drm_vm.c from the build if CONFIG_MMU is not set
How about only including it if !DRM_LEGACY && !DRM_NOUVEAU ?
I don't understand the link between !DRM_LEGACY && !DRM_NOUVEAU and MMU...
By chance would you mean including only if DRM_LEGACY && DRM_NOUVEAU ?
I meant excluding it if !DRM_LEGACY && !DRM_NOUVEAU, sorry, so including it if DRM_LEGACY || DRM_NOUVEAU.
(Probably out of scope for this patch series, but why do we need it in nouveau ?)
Don't ask, but you did: The very first version of the nouveau kms ddx was a partial conversion from ums to kms, and still create some of the old garabge. Among them a ctx and a few other things. Of course it was never used, but the init code was overlooked, and it checks for errors. Which means we can't just fail.
The other problem is that rhel shipped that version of nouveau, which means we need to wait 10 years or so until we can nuke it all :( -Daniel