Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/komeda: Convert logging in komeda_crtc.c to drm_* with drm_device parameter

Replace all dev_err(), dev_warn(), dev_info() and DRM_ERROR/WARN/INFO()
calls in drivers/gpu/drm/arm/display/komeda/komeda_crtc.c with the
corresponding drm_err(), drm_warn(), and drm_info() helpers.

The new drm_*() logging functions take a struct drm_device * as the
first argument. This allows the DRM core to prefix log messages with
the specific DRM device name and instance, which is essential for
distinguishing logs when multiple GPUs or display controllers are present.

This change aligns komeda with the DRM TODO item: "Convert logging to
drm_* functions with drm_device parameter".

Signed-off-by: Rahul Kumar <rk0006818@gmail.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20250926093008.1949131-1-rk0006818@gmail.com

authored by

Rahul Kumar and committed by
Liviu Dudau
83f81f54 6674f54b

+18 -13
+18 -13
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
··· 111 111 static int 112 112 komeda_crtc_prepare(struct komeda_crtc *kcrtc) 113 113 { 114 + struct drm_device *drm = kcrtc->base.dev; 114 115 struct komeda_dev *mdev = kcrtc->base.dev->dev_private; 115 116 struct komeda_pipeline *master = kcrtc->master; 116 117 struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(kcrtc->base.state); ··· 129 128 130 129 err = mdev->funcs->change_opmode(mdev, new_mode); 131 130 if (err) { 132 - DRM_ERROR("failed to change opmode: 0x%x -> 0x%x.\n,", 133 - mdev->dpmode, new_mode); 131 + drm_err(drm, "failed to change opmode: 0x%x -> 0x%x.\n,", 132 + mdev->dpmode, new_mode); 134 133 goto unlock; 135 134 } 136 135 ··· 143 142 if (new_mode != KOMEDA_MODE_DUAL_DISP) { 144 143 err = clk_set_rate(mdev->aclk, komeda_crtc_get_aclk(kcrtc_st)); 145 144 if (err) 146 - DRM_ERROR("failed to set aclk.\n"); 145 + drm_err(drm, "failed to set aclk.\n"); 147 146 err = clk_prepare_enable(mdev->aclk); 148 147 if (err) 149 - DRM_ERROR("failed to enable aclk.\n"); 148 + drm_err(drm, "failed to enable aclk.\n"); 150 149 } 151 150 152 151 err = clk_set_rate(master->pxlclk, mode->crtc_clock * 1000); 153 152 if (err) 154 - DRM_ERROR("failed to set pxlclk for pipe%d\n", master->id); 153 + drm_err(drm, "failed to set pxlclk for pipe%d\n", master->id); 155 154 err = clk_prepare_enable(master->pxlclk); 156 155 if (err) 157 - DRM_ERROR("failed to enable pxl clk for pipe%d.\n", master->id); 156 + drm_err(drm, "failed to enable pxl clk for pipe%d.\n", master->id); 158 157 159 158 unlock: 160 159 mutex_unlock(&mdev->lock); ··· 165 164 static int 166 165 komeda_crtc_unprepare(struct komeda_crtc *kcrtc) 167 166 { 167 + struct drm_device *drm = kcrtc->base.dev; 168 168 struct komeda_dev *mdev = kcrtc->base.dev->dev_private; 169 169 struct komeda_pipeline *master = kcrtc->master; 170 170 u32 new_mode; ··· 182 180 183 181 err = mdev->funcs->change_opmode(mdev, new_mode); 184 182 if (err) { 185 - DRM_ERROR("failed to change opmode: 0x%x -> 0x%x.\n,", 186 - mdev->dpmode, new_mode); 183 + drm_err(drm, "failed to change opmode: 0x%x -> 0x%x.\n,", 184 + mdev->dpmode, new_mode); 187 185 goto unlock; 188 186 } 189 187 ··· 202 200 void komeda_crtc_handle_event(struct komeda_crtc *kcrtc, 203 201 struct komeda_events *evts) 204 202 { 203 + struct drm_device *drm = kcrtc->base.dev; 205 204 struct drm_crtc *crtc = &kcrtc->base; 206 205 u32 events = evts->pipes[kcrtc->master->id]; 207 206 ··· 215 212 if (wb_conn) 216 213 drm_writeback_signal_completion(&wb_conn->base, 0); 217 214 else 218 - DRM_WARN("CRTC[%d]: EOW happen but no wb_connector.\n", 215 + drm_warn(drm, "CRTC[%d]: EOW happen but no wb_connector.\n", 219 216 drm_crtc_index(&kcrtc->base)); 220 217 } 221 218 /* will handle it together with the write back support */ ··· 239 236 crtc->state->event = NULL; 240 237 drm_crtc_send_vblank_event(crtc, event); 241 238 } else { 242 - DRM_WARN("CRTC[%d]: FLIP happened but no pending commit.\n", 239 + drm_warn(drm, "CRTC[%d]: FLIP happened but no pending commit.\n", 243 240 drm_crtc_index(&kcrtc->base)); 244 241 } 245 242 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); ··· 312 309 313 310 /* wait the flip take affect.*/ 314 311 if (wait_for_completion_timeout(flip_done, HZ) == 0) { 315 - DRM_ERROR("wait pipe%d flip done timeout\n", kcrtc->master->id); 312 + drm_err(drm, "wait pipe%d flip done timeout\n", kcrtc->master->id); 316 313 if (!input_flip_done) { 317 314 unsigned long flags; 318 315 ··· 565 562 int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms, 566 563 struct komeda_dev *mdev) 567 564 { 565 + struct drm_device *drm = &kms->base; 568 566 struct komeda_crtc *crtc; 569 567 struct komeda_pipeline *master; 570 568 char str[16]; ··· 585 581 else 586 582 sprintf(str, "None"); 587 583 588 - DRM_INFO("CRTC-%d: master(pipe-%d) slave(%s).\n", 584 + drm_info(drm, "CRTC-%d: master(pipe-%d) slave(%s).\n", 589 585 kms->n_crtcs, master->id, str); 590 586 591 587 kms->n_crtcs++; ··· 617 613 struct komeda_pipeline *pipe, 618 614 struct drm_encoder *encoder) 619 615 { 616 + struct drm_device *drm = encoder->dev; 620 617 struct drm_bridge *bridge; 621 618 int err; 622 619 ··· 629 624 630 625 err = drm_bridge_attach(encoder, bridge, NULL, 0); 631 626 if (err) 632 - dev_err(dev, "bridge_attach() failed for pipe: %s\n", 627 + drm_err(drm, "bridge_attach() failed for pipe: %s\n", 633 628 of_node_full_name(pipe->of_node)); 634 629 635 630 return err;