Hello Everyone, My name is Bala Konda Reddy Mekala. I would like to contribute to the Linux kernel.
While reading the DRM TODO list, I found the " Convert logging to drm_* functions with drm_device parameter" item and chose it because it is marked as a starter. https://www.kernel.org/doc/html/latest/gpu/todo.html#convert-logging-to-drm-functions-with-drm-device-parameter The TODO recommends contacting the relevant maintainers before starting the conversion process. So, I am checking whether you would welcome patches converting the legacy DRM_ERROR/DRM_INFO calls throughout virtio-gpu to device-aware drm_err/drm_info calls. I made a small local change in the drivers/gpu/drm/virtio/virtgpu_prime.c file by replacing DRM_ERROR() calls with drm_err() call. The message strings, failure conditions, and return values remain unchanged. I compiled virtgpu_prime.o before and after the change with W=1, with no warnings observed. If the conversion is welcome, which tree and branch should I base the patch on? I plan to submit this as a single patch, since it is a logging cleanup across a few files in virtio-gpu. For reference, the initial two call diff below of two changes diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index ebf471044d06..8d764e4001f6 100644 --- a/drivers/gpu/drm/virtio/virtgpu_prime.c +++ b/drivers/gpu/drm/virtio/virtgpu_prime.c @@ -289,13 +289,13 @@ int virtgpu_dma_buf_obj_resubmit(struct virtio_gpu_device *vgdev, int i; if (!bo->sgt) { - DRM_ERROR("no sgt bound to virtio_gpu_object\n"); + drm_err(vgdev->ddev, "no sgt bound to virtio_gpu_object\n"); return -ENOMEM; } ents = kvmalloc_objs(struct virtio_gpu_mem_entry, bo->sgt->nents); if (!ents) { - DRM_ERROR("failed to allocate ent list\n"); + drm_err(vgdev->ddev, "failed to allocate ent list\n"); return -ENOMEM; } Thanks, Bala
