linux/drivers/accel/qaic
Pranjal Ramajor Asha Kanojiya cb850f6f69 accel/qaic: Remove ->size field from struct qaic_bo
->size field in struct qaic_bo stores user requested buffer size for
allocate path or size of the dmabuf(PRIME). Now for allocate path driver
allocates a BO of size which is PAGE_SIZE aligned, this size is already
stored in base BO structure (struct drm_gem_object).

So difference is ->size of struct qaic_bo stores the raw value coming from
user and ->size in struct drm_gem_object stores the PAGE_SZIE aligned size.

Do not use ->size from struct qaic_bo for any validation or operation
instead use ->size from struct drm_gem_object since we already have
allocated that much memory then why not use it. Only validate if user
is trying to use more then the BO size. This make the driver more flexible.

After this change ->size field of struct qaic_bo becomes redundant. Remove
it.

Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901172247.11410-2-quic_jhugo@quicinc.com
2023-09-22 09:55:12 -06:00
..
Kconfig accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00
Makefile Revert "accel/qaic: Add mhi_qaic_cntl" 2023-04-13 12:08:08 +02:00
mhi_controller.c
mhi_controller.h
qaic.h accel/qaic: Remove ->size field from struct qaic_bo 2023-09-22 09:55:12 -06:00
qaic_control.c accel/qaic: Fix NNC message corruption 2023-05-23 09:51:38 -06:00
qaic_data.c accel/qaic: Remove ->size field from struct qaic_bo 2023-09-22 09:55:12 -06:00
qaic_drv.c accel/qaic: Use devm_drm_dev_alloc() instead of drm_dev_alloc() 2023-09-15 09:37:07 -06:00