diff options
author | Dave Airlie <airlied@redhat.com> | 2024-01-04 11:18:31 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2024-01-04 11:18:32 +1000 |
commit | faa21f4c20960fee268bdb0fe977ed0edb6685fe (patch) | |
tree | 8bcbef780cf2739903ac77cfac14f8706bc7779e /drivers/accel/qaic/qaic_data.c | |
parent | bc2fdea0065236fdf9fbba3ac77cf5f3d0891443 (diff) | |
parent | 11f9eb899ecc8c02b769cf8d2532ba12786a7af7 (diff) |
Merge tag 'drm-misc-fixes-2024-01-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
drm-misc-fixes for v6.7 final:
- 2 small qaic fixes.
- Fixes for overflow in aux xfer.
- Fix uninitialised gamma lut in gmag200.
- Small compiler warning fix for backports of a ps8640 fix.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9ba866b4-3144-47a9-a2c0-7313c67249d7@linux.intel.com
Diffstat (limited to 'drivers/accel/qaic/qaic_data.c')
-rw-r--r-- | drivers/accel/qaic/qaic_data.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c index 4a8e43a7a6a4..d42f002bc0cf 100644 --- a/drivers/accel/qaic/qaic_data.c +++ b/drivers/accel/qaic/qaic_data.c @@ -777,7 +777,6 @@ struct drm_gem_object *qaic_gem_prime_import(struct drm_device *dev, struct dma_ struct dma_buf_attachment *attach; struct drm_gem_object *obj; struct qaic_bo *bo; - size_t size; int ret; bo = qaic_alloc_init_bo(); @@ -795,13 +794,12 @@ struct drm_gem_object *qaic_gem_prime_import(struct drm_device *dev, struct dma_ goto attach_fail; } - size = PAGE_ALIGN(attach->dmabuf->size); - if (size == 0) { + if (!attach->dmabuf->size) { ret = -EINVAL; goto size_align_fail; } - drm_gem_private_object_init(dev, obj, size); + drm_gem_private_object_init(dev, obj, attach->dmabuf->size); /* * skipping dma_buf_map_attachment() as we do not know the direction * just yet. Once the direction is known in the subsequent IOCTL to |