From: Ville Syrjälä ville.syrjala@linux.intel.com
We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50.
Cc: Ben Skeggs bskeggs@redhat.com Cc: Lyude Paul lyude@redhat.com Cc: nouveau@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@ffwll.ch Reviewed-by: Daniel Vetter daniel.vetter@ffwll.ch Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 70dce544984e..670535a68d3b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev) nouveau_display(dev)->fini = nv04_display_fini;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */ - dev->driver->driver_features &= ~DRIVER_ATOMIC; + dev->driver_features &= ~DRIVER_ATOMIC;
nouveau_hw_save_vga_fonts(dev, 1);
From: Ville Syrjälä ville.syrjala@linux.intel.com
Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing.
Cc: Alex Deucher alexander.deucher@amd.com Cc: "Christian König" christian.koenig@amd.com Cc: "David (ChunMing) Zhou" David1.Zhou@amd.com Cc: Harry Wentland harry.wentland@amd.com Cc: Michel Dänzer michel@daenzer.net Suggested-by: Michel Dänzer michel@daenzer.net Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6870909da926..8c1db96be070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (ret) return ret;
- /* warn the user if they mix atomic and non-atomic capable GPUs */ - if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic) - DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n"); - /* support atomic early so the atomic debugfs stuff gets created */ - if (supports_atomic) - kms_driver.driver_features |= DRIVER_ATOMIC; - dev = drm_dev_alloc(&kms_driver, &pdev->dev); if (IS_ERR(dev)) return PTR_ERR(dev);
+ if (!supports_atomic) + dev->driver_features &= ~DRIVER_ATOMIC; + ret = pci_enable_device(pdev); if (ret) goto err_free; @@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
static struct drm_driver kms_driver = { .driver_features = - DRIVER_USE_AGP | + DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ, .load = amdgpu_driver_load_kms,
On 2018-09-13 6:31 p.m., Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing.
Cc: Alex Deucher alexander.deucher@amd.com Cc: "Christian König" christian.koenig@amd.com Cc: "David (ChunMing) Zhou" David1.Zhou@amd.com Cc: Harry Wentland harry.wentland@amd.com Cc: Michel Dänzer michel@daenzer.net Suggested-by: Michel Dänzer michel@daenzer.net Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6870909da926..8c1db96be070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (ret) return ret;
- /* warn the user if they mix atomic and non-atomic capable GPUs */
- if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
- /* support atomic early so the atomic debugfs stuff gets created */
- if (supports_atomic)
kms_driver.driver_features |= DRIVER_ATOMIC;
- dev = drm_dev_alloc(&kms_driver, &pdev->dev); if (IS_ERR(dev)) return PTR_ERR(dev);
- if (!supports_atomic)
dev->driver_features &= ~DRIVER_ATOMIC;
- ret = pci_enable_device(pdev); if (ret) goto err_free;
@@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
static struct drm_driver kms_driver = { .driver_features =
DRIVER_USE_AGP |
.load = amdgpu_driver_load_kms,DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,
Thanks Ville for taking care of this!
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
If Alex agrees, probably best to push this to drm-misc-next as well.
On Thu, Sep 13, 2018 at 12:39 PM Michel Dänzer michel@daenzer.net wrote:
On 2018-09-13 6:31 p.m., Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing.
Cc: Alex Deucher alexander.deucher@amd.com Cc: "Christian König" christian.koenig@amd.com Cc: "David (ChunMing) Zhou" David1.Zhou@amd.com Cc: Harry Wentland harry.wentland@amd.com Cc: Michel Dänzer michel@daenzer.net Suggested-by: Michel Dänzer michel@daenzer.net Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6870909da926..8c1db96be070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (ret) return ret;
/* warn the user if they mix atomic and non-atomic capable GPUs */
if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
/* support atomic early so the atomic debugfs stuff gets created */
if (supports_atomic)
kms_driver.driver_features |= DRIVER_ATOMIC;
dev = drm_dev_alloc(&kms_driver, &pdev->dev); if (IS_ERR(dev)) return PTR_ERR(dev);
if (!supports_atomic)
dev->driver_features &= ~DRIVER_ATOMIC;
ret = pci_enable_device(pdev); if (ret) goto err_free;
@@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
static struct drm_driver kms_driver = { .driver_features =
DRIVER_USE_AGP |
DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ, .load = amdgpu_driver_load_kms,
Thanks Ville for taking care of this!
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
If Alex agrees, probably best to push this to drm-misc-next as well.
Reviewed-by: Alex Deucher alexander.deucher@amd.com
Please go ahead and merge through drm-misc.
Thanks!
Alex
-- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Thu, Sep 13, 2018 at 12:40:20PM -0400, Alex Deucher wrote:
On Thu, Sep 13, 2018 at 12:39 PM Michel Dänzer michel@daenzer.net wrote:
On 2018-09-13 6:31 p.m., Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing.
Cc: Alex Deucher alexander.deucher@amd.com Cc: "Christian König" christian.koenig@amd.com Cc: "David (ChunMing) Zhou" David1.Zhou@amd.com Cc: Harry Wentland harry.wentland@amd.com Cc: Michel Dänzer michel@daenzer.net Suggested-by: Michel Dänzer michel@daenzer.net Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6870909da926..8c1db96be070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (ret) return ret;
/* warn the user if they mix atomic and non-atomic capable GPUs */
if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
/* support atomic early so the atomic debugfs stuff gets created */
if (supports_atomic)
kms_driver.driver_features |= DRIVER_ATOMIC;
dev = drm_dev_alloc(&kms_driver, &pdev->dev); if (IS_ERR(dev)) return PTR_ERR(dev);
if (!supports_atomic)
dev->driver_features &= ~DRIVER_ATOMIC;
ret = pci_enable_device(pdev); if (ret) goto err_free;
@@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
static struct drm_driver kms_driver = { .driver_features =
DRIVER_USE_AGP |
DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ, .load = amdgpu_driver_load_kms,
Thanks Ville for taking care of this!
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
If Alex agrees, probably best to push this to drm-misc-next as well.
Reviewed-by: Alex Deucher alexander.deucher@amd.com
Please go ahead and merge through drm-misc.
Thanks!
You are welcome, and thanks for the r-bs. Pushed.
On 2018-09-13 12:31 PM, Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Disable atomic on a per-device basis instead of for all devices. Made possible by the new device.driver_features thing.
Cc: Alex Deucher alexander.deucher@amd.com Cc: "Christian König" christian.koenig@amd.com Cc: "David (ChunMing) Zhou" David1.Zhou@amd.com Cc: Harry Wentland harry.wentland@amd.com Cc: Michel Dänzer michel@daenzer.net Suggested-by: Michel Dänzer michel@daenzer.net Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
Reviewed-by: Harry Wentland harry.wentland@amd.com
Harry
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6870909da926..8c1db96be070 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (ret) return ret;
- /* warn the user if they mix atomic and non-atomic capable GPUs */
- if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
- /* support atomic early so the atomic debugfs stuff gets created */
- if (supports_atomic)
kms_driver.driver_features |= DRIVER_ATOMIC;
- dev = drm_dev_alloc(&kms_driver, &pdev->dev); if (IS_ERR(dev)) return PTR_ERR(dev);
- if (!supports_atomic)
dev->driver_features &= ~DRIVER_ATOMIC;
- ret = pci_enable_device(pdev); if (ret) goto err_free;
@@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
static struct drm_driver kms_driver = { .driver_features =
DRIVER_USE_AGP |
.load = amdgpu_driver_load_kms,DRIVER_USE_AGP | DRIVER_ATOMIC | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,
Hm, one nitpick here. Since /sys/kernel/debug/dri/*/state creation depends on the driver supporting atomic, maybe it would be good to make it so that we set DRIVER_ATOMIC in the driver_stub structure, then disable it per-device depending on the nouveau_atomic setting + hw support. That way we can always have the state debugfs file while maintaining nouveau's current behavior with exposing atomic ioctls. Assuming that wouldn't have any unintended side-effects of course
On Thu, 2018-09-13 at 19:31 +0300, Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50.
Cc: Ben Skeggs bskeggs@redhat.com Cc: Lyude Paul lyude@redhat.com Cc: nouveau@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@ffwll.ch Reviewed-by: Daniel Vetter daniel.vetter@ffwll.ch Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 70dce544984e..670535a68d3b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev) nouveau_display(dev)->fini = nv04_display_fini;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
- dev->driver->driver_features &= ~DRIVER_ATOMIC;
dev->driver_features &= ~DRIVER_ATOMIC;
nouveau_hw_save_vga_fonts(dev, 1);
On Thu, Sep 13, 2018 at 11:02 PM, Lyude Paul lyude@redhat.com wrote:
Hm, one nitpick here. Since /sys/kernel/debug/dri/*/state creation depends on the driver supporting atomic, maybe it would be good to make it so that we set DRIVER_ATOMIC in the driver_stub structure, then disable it per-device depending on the nouveau_atomic setting + hw support. That way we can always have the state debugfs file while maintaining nouveau's current behavior with exposing atomic ioctls. Assuming that wouldn't have any unintended side-effects of course
dri/*/state only works with atomic drivers. There's no explicit state with legacy drivers at all, it's all just implicit in hw and some random driver structures.
We should make sure though that the debugfs stuff looks at drm_drv_uses_atomic_modsetting(), and not DRIVER_ATOMIC. Former is about the internals (i915 is internally atomic everywhere), latter about the uapi (some old platforms aren't properly validated for full atomic features, hence why it's disabled). -Daniel
On Thu, 2018-09-13 at 19:31 +0300, Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50.
Cc: Ben Skeggs bskeggs@redhat.com Cc: Lyude Paul lyude@redhat.com Cc: nouveau@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@ffwll.ch Reviewed-by: Daniel Vetter daniel.vetter@ffwll.ch Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 70dce544984e..670535a68d3b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev) nouveau_display(dev)->fini = nv04_display_fini;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
dev->driver->driver_features &= ~DRIVER_ATOMIC;
dev->driver_features &= ~DRIVER_ATOMIC; nouveau_hw_save_vga_fonts(dev, 1);
On Fri, 2018-09-14 at 10:11 +0200, Daniel Vetter wrote:
On Thu, Sep 13, 2018 at 11:02 PM, Lyude Paul lyude@redhat.com wrote:
Hm, one nitpick here. Since /sys/kernel/debug/dri/*/state creation depends on the driver supporting atomic, maybe it would be good to make it so that we set DRIVER_ATOMIC in the driver_stub structure, then disable it per-device depending on the nouveau_atomic setting + hw support. That way we can always have the state debugfs file while maintaining nouveau's current behavior with exposing atomic ioctls. Assuming that wouldn't have any unintended side-effects of course
dri/*/state only works with atomic drivers. There's no explicit state with legacy drivers at all, it's all just implicit in hw and some random driver structures.
We should make sure though that the debugfs stuff looks at drm_drv_uses_atomic_modsetting(), and not DRIVER_ATOMIC. Former is about the internals (i915 is internally atomic everywhere), latter about the uapi (some old platforms aren't properly validated for full atomic features, hence why it's disabled). -Daniel
Makes sense, it seems doing that results in exactly what I wanted with nouveau! As for this patch:
Reviewed-by: Lyude Paul lyude@redhat.com
On Thu, 2018-09-13 at 19:31 +0300, Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50.
Cc: Ben Skeggs bskeggs@redhat.com Cc: Lyude Paul lyude@redhat.com Cc: nouveau@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@ffwll.ch Reviewed-by: Daniel Vetter daniel.vetter@ffwll.ch Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 70dce544984e..670535a68d3b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev) nouveau_display(dev)->fini = nv04_display_fini;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
dev->driver->driver_features &= ~DRIVER_ATOMIC;
dev->driver_features &= ~DRIVER_ATOMIC; nouveau_hw_save_vga_fonts(dev, 1);
On Thu, Sep 13, 2018 at 05:02:05PM -0400, Lyude Paul wrote:
Hm, one nitpick here. Since /sys/kernel/debug/dri/*/state creation depends on the driver supporting atomic, maybe it would be good to make it so that we set DRIVER_ATOMIC in the driver_stub structure, then disable it per-device depending on the nouveau_atomic setting + hw support. That way we can always have the state debugfs file while maintaining nouveau's current behavior with exposing atomic ioctls. Assuming that wouldn't have any unintended side-effects of course
I'm not sure why there are three driver structs in nouveau. Maybe someone can just nuke two of them?
On Thu, 2018-09-13 at 19:31 +0300, Ville Syrjala wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50.
Cc: Ben Skeggs bskeggs@redhat.com Cc: Lyude Paul lyude@redhat.com Cc: nouveau@lists.freedesktop.org Cc: Daniel Vetter daniel.vetter@ffwll.ch Reviewed-by: Daniel Vetter daniel.vetter@ffwll.ch Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c b/drivers/gpu/drm/nouveau/dispnv04/disp.c index 70dce544984e..670535a68d3b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev) nouveau_display(dev)->fini = nv04_display_fini;
/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
- dev->driver->driver_features &= ~DRIVER_ATOMIC;
dev->driver_features &= ~DRIVER_ATOMIC;
nouveau_hw_save_vga_fonts(dev, 1);
Hi Ville,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180913] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-nouveau-Disable-a... config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/gpu/drm/nouveau/dispnv04/disp.c: In function 'nv04_display_create':
drivers/gpu/drm/nouveau/dispnv04/disp.c:59:5: error: 'struct drm_device' has no member named 'driver_features'
dev->driver_features &= ~DRIVER_ATOMIC; ^~
vim +59 drivers/gpu/drm/nouveau/dispnv04/disp.c
33 34 int 35 nv04_display_create(struct drm_device *dev) 36 { 37 struct nouveau_drm *drm = nouveau_drm(dev); 38 struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device); 39 struct dcb_table *dcb = &drm->vbios.dcb; 40 struct drm_connector *connector, *ct; 41 struct drm_encoder *encoder; 42 struct nouveau_encoder *nv_encoder; 43 struct nouveau_crtc *crtc; 44 struct nv04_display *disp; 45 int i, ret; 46 47 disp = kzalloc(sizeof(*disp), GFP_KERNEL); 48 if (!disp) 49 return -ENOMEM; 50 51 nvif_object_map(&drm->client.device.object, NULL, 0); 52 53 nouveau_display(dev)->priv = disp; 54 nouveau_display(dev)->dtor = nv04_display_destroy; 55 nouveau_display(dev)->init = nv04_display_init; 56 nouveau_display(dev)->fini = nv04_display_fini; 57 58 /* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
59 dev->driver_features &= ~DRIVER_ATOMIC;
60 61 nouveau_hw_save_vga_fonts(dev, 1); 62 63 nv04_crtc_create(dev, 0); 64 if (nv_two_heads(dev)) 65 nv04_crtc_create(dev, 1); 66 67 for (i = 0; i < dcb->entries; i++) { 68 struct dcb_output *dcbent = &dcb->entry[i]; 69 70 connector = nouveau_connector_create(dev, dcbent->connector); 71 if (IS_ERR(connector)) 72 continue; 73 74 switch (dcbent->type) { 75 case DCB_OUTPUT_ANALOG: 76 ret = nv04_dac_create(connector, dcbent); 77 break; 78 case DCB_OUTPUT_LVDS: 79 case DCB_OUTPUT_TMDS: 80 ret = nv04_dfp_create(connector, dcbent); 81 break; 82 case DCB_OUTPUT_TV: 83 if (dcbent->location == DCB_LOC_ON_CHIP) 84 ret = nv17_tv_create(connector, dcbent); 85 else 86 ret = nv04_tv_create(connector, dcbent); 87 break; 88 default: 89 NV_WARN(drm, "DCB type %d not known\n", dcbent->type); 90 continue; 91 } 92 93 if (ret) 94 continue; 95 } 96 97 list_for_each_entry_safe(connector, ct, 98 &dev->mode_config.connector_list, head) { 99 if (!connector->encoder_ids[0]) { 100 NV_WARN(drm, "%s has no encoders, removing\n", 101 connector->name); 102 connector->funcs->destroy(connector); 103 } 104 } 105 106 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { 107 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 108 struct nvkm_i2c_bus *bus = 109 nvkm_i2c_bus_find(i2c, nv_encoder->dcb->i2c_index); 110 nv_encoder->i2c = bus ? &bus->i2c : NULL; 111 } 112 113 /* Save previous state */ 114 list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) 115 crtc->save(&crtc->base); 116 117 list_for_each_entry(nv_encoder, &dev->mode_config.encoder_list, base.base.head) 118 nv_encoder->enc_save(&nv_encoder->base.base); 119 120 nouveau_overlay_init(dev); 121 122 return 0; 123 } 124
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
dri-devel@lists.freedesktop.org