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

drm/lima: standardize debug messages by ip name

Some debug messages carried the ip name, or included "lima", or
included both the ip name and then the numbered ip name again.
Make the messages more consistent by always looking up and showing
the ip name first.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240124025947.2110659-9-nunes.erico@gmail.com

authored by

Erico Nunes and committed by
Qiang Yu
423af970 9e5690a1

+36 -30
+11 -9
drivers/gpu/drm/lima/lima_gp.c
··· 34 34 if (state & LIMA_GP_IRQ_MASK_ERROR) { 35 35 if ((state & LIMA_GP_IRQ_MASK_ERROR) == 36 36 LIMA_GP_IRQ_PLBU_OUT_OF_MEM) { 37 - dev_dbg(dev->dev, "gp out of heap irq status=%x\n", 38 - status); 37 + dev_dbg(dev->dev, "%s out of heap irq status=%x\n", 38 + lima_ip_name(ip), status); 39 39 } else { 40 - dev_err(dev->dev, "gp error irq state=%x status=%x\n", 41 - state, status); 40 + dev_err(dev->dev, "%s error irq state=%x status=%x\n", 41 + lima_ip_name(ip), state, status); 42 42 if (task) 43 43 task->recoverable = false; 44 44 } ··· 89 89 v & LIMA_GP_IRQ_RESET_COMPLETED, 90 90 0, 100); 91 91 if (err) { 92 - dev_err(dev->dev, "gp soft reset time out\n"); 92 + dev_err(dev->dev, "%s soft reset time out\n", 93 + lima_ip_name(ip)); 93 94 return err; 94 95 } 95 96 ··· 195 194 gp_write(LIMA_GP_CMD, LIMA_GP_CMD_RESET); 196 195 ret = lima_poll_timeout(ip, lima_gp_hard_reset_poll, 10, 100); 197 196 if (ret) { 198 - dev_err(dev->dev, "gp hard reset timeout\n"); 197 + dev_err(dev->dev, "%s hard reset timeout\n", lima_ip_name(ip)); 199 198 return ret; 200 199 } 201 200 ··· 221 220 { 222 221 struct lima_ip *ip = pipe->processor[0]; 223 222 224 - dev_err(ip->dev->dev, "gp task error int_state=%x status=%x\n", 225 - gp_read(LIMA_GP_INT_STAT), gp_read(LIMA_GP_STATUS)); 223 + dev_err(ip->dev->dev, "%s task error int_state=%x status=%x\n", 224 + lima_ip_name(ip), gp_read(LIMA_GP_INT_STAT), 225 + gp_read(LIMA_GP_STATUS)); 226 226 227 227 lima_gp_hard_reset(ip); 228 228 } ··· 326 324 err = devm_request_irq(dev->dev, ip->irq, lima_gp_irq_handler, 327 325 IRQF_SHARED, lima_ip_name(ip), ip); 328 326 if (err) { 329 - dev_err(dev->dev, "gp %s fail to request irq\n", 327 + dev_err(dev->dev, "%s fail to request irq\n", 330 328 lima_ip_name(ip)); 331 329 return err; 332 330 }
+4 -2
drivers/gpu/drm/lima/lima_l2_cache.c
··· 21 21 !(v & LIMA_L2_CACHE_STATUS_COMMAND_BUSY), 22 22 0, 1000); 23 23 if (err) { 24 - dev_err(dev->dev, "l2 cache wait command timeout\n"); 24 + dev_err(dev->dev, "%s wait command timeout\n", 25 + lima_ip_name(ip)); 25 26 return err; 26 27 } 27 28 return 0; ··· 84 83 spin_lock_init(&ip->data.lock); 85 84 86 85 size = l2_cache_read(LIMA_L2_CACHE_SIZE); 87 - dev_info(dev->dev, "l2 cache %uK, %u-way, %ubyte cache line, %ubit external bus\n", 86 + dev_info(dev->dev, "%s %uK, %u-way, %ubyte cache line, %ubit external bus\n", 87 + lima_ip_name(ip), 88 88 1 << (((size >> 16) & 0xff) - 10), 89 89 1 << ((size >> 8) & 0xff), 90 90 1 << (size & 0xff),
+9 -9
drivers/gpu/drm/lima/lima_mmu.c
··· 22 22 cond, 0, 100); \ 23 23 if (__ret) \ 24 24 dev_err(dev->dev, \ 25 - "mmu command %x timeout\n", cmd); \ 25 + "%s command %x timeout\n", \ 26 + lima_ip_name(ip), cmd); \ 26 27 __ret; \ 27 28 }) 28 29 ··· 41 40 if (status & LIMA_MMU_INT_PAGE_FAULT) { 42 41 u32 fault = mmu_read(LIMA_MMU_PAGE_FAULT_ADDR); 43 42 44 - dev_err(dev->dev, "mmu page fault at 0x%x from bus id %d of type %s on %s\n", 45 - fault, LIMA_MMU_STATUS_BUS_ID(status), 46 - status & LIMA_MMU_STATUS_PAGE_FAULT_IS_WRITE ? "write" : "read", 47 - lima_ip_name(ip)); 43 + dev_err(dev->dev, "%s page fault at 0x%x from bus id %d of type %s\n", 44 + lima_ip_name(ip), fault, LIMA_MMU_STATUS_BUS_ID(status), 45 + status & LIMA_MMU_STATUS_PAGE_FAULT_IS_WRITE ? "write" : "read"); 48 46 } 49 47 50 48 if (status & LIMA_MMU_INT_READ_BUS_ERROR) 51 - dev_err(dev->dev, "mmu %s irq bus error\n", lima_ip_name(ip)); 49 + dev_err(dev->dev, "%s irq bus error\n", lima_ip_name(ip)); 52 50 53 51 /* mask all interrupts before resume */ 54 52 mmu_write(LIMA_MMU_INT_MASK, 0); ··· 102 102 103 103 mmu_write(LIMA_MMU_DTE_ADDR, 0xCAFEBABE); 104 104 if (mmu_read(LIMA_MMU_DTE_ADDR) != 0xCAFEB000) { 105 - dev_err(dev->dev, "mmu %s dte write test fail\n", lima_ip_name(ip)); 105 + dev_err(dev->dev, "%s dte write test fail\n", lima_ip_name(ip)); 106 106 return -EIO; 107 107 } 108 108 109 109 err = devm_request_irq(dev->dev, ip->irq, lima_mmu_irq_handler, 110 110 IRQF_SHARED, lima_ip_name(ip), ip); 111 111 if (err) { 112 - dev_err(dev->dev, "mmu %s fail to request irq\n", lima_ip_name(ip)); 112 + dev_err(dev->dev, "%s fail to request irq\n", lima_ip_name(ip)); 113 113 return err; 114 114 } 115 115 ··· 152 152 u32 v; 153 153 154 154 if (status & LIMA_MMU_STATUS_PAGE_FAULT_ACTIVE) { 155 - dev_info(dev->dev, "mmu resume\n"); 155 + dev_info(dev->dev, "%s resume\n", lima_ip_name(ip)); 156 156 157 157 mmu_write(LIMA_MMU_INT_MASK, 0); 158 158 mmu_write(LIMA_MMU_DTE_ADDR, 0xCAFEBABE);
+2 -1
drivers/gpu/drm/lima/lima_pmu.c
··· 21 21 v, v & LIMA_PMU_INT_CMD_MASK, 22 22 100, 100000); 23 23 if (err) { 24 - dev_err(dev->dev, "timeout wait pmu cmd\n"); 24 + dev_err(dev->dev, "%s timeout wait pmu cmd\n", 25 + lima_ip_name(ip)); 25 26 return err; 26 27 } 27 28
+10 -9
drivers/gpu/drm/lima/lima_pp.c
··· 26 26 if (state & LIMA_PP_IRQ_MASK_ERROR) { 27 27 u32 status = pp_read(LIMA_PP_STATUS); 28 28 29 - dev_err(dev->dev, "pp error irq state=%x status=%x\n", 30 - state, status); 29 + dev_err(dev->dev, "%s error irq state=%x status=%x\n", 30 + lima_ip_name(ip), state, status); 31 31 32 32 pipe->error = true; 33 33 ··· 125 125 126 126 ret = lima_poll_timeout(ip, lima_pp_soft_reset_poll, 0, 100); 127 127 if (ret) { 128 - dev_err(dev->dev, "pp %s reset time out\n", lima_ip_name(ip)); 128 + dev_err(dev->dev, "%s reset time out\n", lima_ip_name(ip)); 129 129 return ret; 130 130 } 131 131 ··· 190 190 pp_write(LIMA_PP_CTRL, LIMA_PP_CTRL_STOP_BUS); 191 191 ret = lima_poll_timeout(ip, lima_pp_bus_stop_poll, 10, 100); 192 192 if (ret) { 193 - dev_err(dev->dev, "pp %s bus stop timeout\n", lima_ip_name(ip)); 193 + dev_err(dev->dev, "%s bus stop timeout\n", lima_ip_name(ip)); 194 194 return ret; 195 195 } 196 196 197 197 pp_write(LIMA_PP_CTRL, LIMA_PP_CTRL_FORCE_RESET); 198 198 ret = lima_poll_timeout(ip, lima_pp_hard_reset_poll, 10, 100); 199 199 if (ret) { 200 - dev_err(dev->dev, "pp hard reset timeout\n"); 200 + dev_err(dev->dev, "%s hard reset timeout\n", lima_ip_name(ip)); 201 201 return ret; 202 202 } 203 203 ··· 274 274 err = devm_request_irq(dev->dev, ip->irq, lima_pp_irq_handler, 275 275 IRQF_SHARED, lima_ip_name(ip), ip); 276 276 if (err) { 277 - dev_err(dev->dev, "pp %s fail to request irq\n", 277 + dev_err(dev->dev, "%s fail to request irq\n", 278 278 lima_ip_name(ip)); 279 279 return err; 280 280 } ··· 309 309 err = devm_request_irq(dev->dev, ip->irq, lima_pp_bcast_irq_handler, 310 310 IRQF_SHARED, lima_ip_name(ip), ip); 311 311 if (err) { 312 - dev_err(dev->dev, "pp %s fail to request irq\n", 312 + dev_err(dev->dev, "%s fail to request irq\n", 313 313 lima_ip_name(ip)); 314 314 return err; 315 315 } ··· 423 423 for (i = 0; i < pipe->num_processor; i++) { 424 424 struct lima_ip *ip = pipe->processor[i]; 425 425 426 - dev_err(ip->dev->dev, "pp task error %d int_state=%x status=%x\n", 427 - i, pp_read(LIMA_PP_INT_STATUS), pp_read(LIMA_PP_STATUS)); 426 + dev_err(ip->dev->dev, "%s task error %d int_state=%x status=%x\n", 427 + lima_ip_name(ip), i, pp_read(LIMA_PP_INT_STATUS), 428 + pp_read(LIMA_PP_STATUS)); 428 429 429 430 lima_pp_hard_reset(ip); 430 431 }