Message ID | 20210216113716.716996-9-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/qxl: a collection of fixes | expand |
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann: > Use the correct kmap variant. We don't hold a reservation here, > so we can't use the _locked variant. We can drop the pin because > qxl_bo_kmap will do that for us. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > drivers/gpu/drm/qxl/qxl_display.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c > index 8672385a1caf..7500560db8e4 100644 > --- a/drivers/gpu/drm/qxl/qxl_display.c > +++ b/drivers/gpu/drm/qxl/qxl_display.c > @@ -1159,12 +1159,10 @@ int qxl_create_monitors_object(struct qxl_device *qdev) > } > qdev->monitors_config_bo = gem_to_qxl_bo(gobj); > > - ret = qxl_bo_pin(qdev->monitors_config_bo); > + ret = qxl_bo_kmap(qdev->monitors_config_bo, &map); > if (ret) > return ret; > > - qxl_bo_kmap_locked(qdev->monitors_config_bo, &map); > - > qdev->monitors_config = qdev->monitors_config_bo->kptr; > qdev->ram_header->monitors_config = > qxl_bo_physical_address(qdev, qdev->monitors_config_bo, 0); > @@ -1189,8 +1187,7 @@ int qxl_destroy_monitors_object(struct qxl_device *qdev) > qdev->monitors_config = NULL; > qdev->ram_header->monitors_config = 0; > > - qxl_bo_kunmap_locked(qdev->monitors_config_bo); > - ret = qxl_bo_unpin(qdev->monitors_config_bo); > + ret = qxl_bo_kunmap(qdev->monitors_config_bo); > if (ret) > return ret; > >
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 8672385a1caf..7500560db8e4 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1159,12 +1159,10 @@ int qxl_create_monitors_object(struct qxl_device *qdev) } qdev->monitors_config_bo = gem_to_qxl_bo(gobj); - ret = qxl_bo_pin(qdev->monitors_config_bo); + ret = qxl_bo_kmap(qdev->monitors_config_bo, &map); if (ret) return ret; - qxl_bo_kmap_locked(qdev->monitors_config_bo, &map); - qdev->monitors_config = qdev->monitors_config_bo->kptr; qdev->ram_header->monitors_config = qxl_bo_physical_address(qdev, qdev->monitors_config_bo, 0); @@ -1189,8 +1187,7 @@ int qxl_destroy_monitors_object(struct qxl_device *qdev) qdev->monitors_config = NULL; qdev->ram_header->monitors_config = 0; - qxl_bo_kunmap_locked(qdev->monitors_config_bo); - ret = qxl_bo_unpin(qdev->monitors_config_bo); + ret = qxl_bo_kunmap(qdev->monitors_config_bo); if (ret) return ret;
Use the correct kmap variant. We don't hold a reservation here, so we can't use the _locked variant. We can drop the pin because qxl_bo_kmap will do that for us. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/qxl/qxl_display.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)