aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/atom.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-02-28 07:55:52 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:53:24 -0400
commit7ca85295d8cc280ea79cf6250c47363b7fd92f92 (patch)
treeefcd4b095533ddbb7e03dc305403fde3873d940c /drivers/gpu/drm/amd/amdgpu/atom.c
parenteeca2324900e922b693b2b6ddacc502c78f1c1ef (diff)
gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level>
Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments o Neaten a few macros now using pr_<level> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atom.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/atom.c44
1 files changed, 19 insertions, 25 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 1b50e6c13fb3..d1444aaca038 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -166,7 +166,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
166 case ATOM_IIO_END: 166 case ATOM_IIO_END:
167 return temp; 167 return temp;
168 default: 168 default:
169 printk(KERN_INFO "Unknown IIO opcode.\n"); 169 pr_info("Unknown IIO opcode\n");
170 return 0; 170 return 0;
171 } 171 }
172} 172}
@@ -190,22 +190,19 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
190 val = gctx->card->reg_read(gctx->card, idx); 190 val = gctx->card->reg_read(gctx->card, idx);
191 break; 191 break;
192 case ATOM_IO_PCI: 192 case ATOM_IO_PCI:
193 printk(KERN_INFO 193 pr_info("PCI registers are not implemented\n");
194 "PCI registers are not implemented.\n");
195 return 0; 194 return 0;
196 case ATOM_IO_SYSIO: 195 case ATOM_IO_SYSIO:
197 printk(KERN_INFO 196 pr_info("SYSIO registers are not implemented\n");
198 "SYSIO registers are not implemented.\n");
199 return 0; 197 return 0;
200 default: 198 default:
201 if (!(gctx->io_mode & 0x80)) { 199 if (!(gctx->io_mode & 0x80)) {
202 printk(KERN_INFO "Bad IO mode.\n"); 200 pr_info("Bad IO mode\n");
203 return 0; 201 return 0;
204 } 202 }
205 if (!gctx->iio[gctx->io_mode & 0x7F]) { 203 if (!gctx->iio[gctx->io_mode & 0x7F]) {
206 printk(KERN_INFO 204 pr_info("Undefined indirect IO read method %d\n",
207 "Undefined indirect IO read method %d.\n", 205 gctx->io_mode & 0x7F);
208 gctx->io_mode & 0x7F);
209 return 0; 206 return 0;
210 } 207 }
211 val = 208 val =
@@ -469,22 +466,19 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
469 gctx->card->reg_write(gctx->card, idx, val); 466 gctx->card->reg_write(gctx->card, idx, val);
470 break; 467 break;
471 case ATOM_IO_PCI: 468 case ATOM_IO_PCI:
472 printk(KERN_INFO 469 pr_info("PCI registers are not implemented\n");
473 "PCI registers are not implemented.\n");
474 return; 470 return;
475 case ATOM_IO_SYSIO: 471 case ATOM_IO_SYSIO:
476 printk(KERN_INFO 472 pr_info("SYSIO registers are not implemented\n");
477 "SYSIO registers are not implemented.\n");
478 return; 473 return;
479 default: 474 default:
480 if (!(gctx->io_mode & 0x80)) { 475 if (!(gctx->io_mode & 0x80)) {
481 printk(KERN_INFO "Bad IO mode.\n"); 476 pr_info("Bad IO mode\n");
482 return; 477 return;
483 } 478 }
484 if (!gctx->iio[gctx->io_mode & 0xFF]) { 479 if (!gctx->iio[gctx->io_mode & 0xFF]) {
485 printk(KERN_INFO 480 pr_info("Undefined indirect IO write method %d\n",
486 "Undefined indirect IO write method %d.\n", 481 gctx->io_mode & 0x7F);
487 gctx->io_mode & 0x7F);
488 return; 482 return;
489 } 483 }
490 atom_iio_execute(gctx, gctx->iio[gctx->io_mode & 0xFF], 484 atom_iio_execute(gctx, gctx->iio[gctx->io_mode & 0xFF],
@@ -850,17 +844,17 @@ static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg)
850 844
851static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg) 845static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
852{ 846{
853 printk(KERN_INFO "unimplemented!\n"); 847 pr_info("unimplemented!\n");
854} 848}
855 849
856static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg) 850static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
857{ 851{
858 printk(KERN_INFO "unimplemented!\n"); 852 pr_info("unimplemented!\n");
859} 853}
860 854
861static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg) 855static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
862{ 856{
863 printk(KERN_INFO "unimplemented!\n"); 857 pr_info("unimplemented!\n");
864} 858}
865 859
866static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg) 860static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg)
@@ -1023,7 +1017,7 @@ static void atom_op_switch(atom_exec_context *ctx, int *ptr, int arg)
1023 } 1017 }
1024 (*ptr) += 2; 1018 (*ptr) += 2;
1025 } else { 1019 } else {
1026 printk(KERN_INFO "Bad case.\n"); 1020 pr_info("Bad case\n");
1027 return; 1021 return;
1028 } 1022 }
1029 (*ptr) += 2; 1023 (*ptr) += 2;
@@ -1316,14 +1310,14 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
1316 ctx->bios = bios; 1310 ctx->bios = bios;
1317 1311
1318 if (CU16(0) != ATOM_BIOS_MAGIC) { 1312 if (CU16(0) != ATOM_BIOS_MAGIC) {
1319 printk(KERN_INFO "Invalid BIOS magic.\n"); 1313 pr_info("Invalid BIOS magic\n");
1320 kfree(ctx); 1314 kfree(ctx);
1321 return NULL; 1315 return NULL;
1322 } 1316 }
1323 if (strncmp 1317 if (strncmp
1324 (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC, 1318 (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC,
1325 strlen(ATOM_ATI_MAGIC))) { 1319 strlen(ATOM_ATI_MAGIC))) {
1326 printk(KERN_INFO "Invalid ATI magic.\n"); 1320 pr_info("Invalid ATI magic\n");
1327 kfree(ctx); 1321 kfree(ctx);
1328 return NULL; 1322 return NULL;
1329 } 1323 }
@@ -1332,7 +1326,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
1332 if (strncmp 1326 if (strncmp
1333 (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC, 1327 (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC,
1334 strlen(ATOM_ROM_MAGIC))) { 1328 strlen(ATOM_ROM_MAGIC))) {
1335 printk(KERN_INFO "Invalid ATOM magic.\n"); 1329 pr_info("Invalid ATOM magic\n");
1336 kfree(ctx); 1330 kfree(ctx);
1337 return NULL; 1331 return NULL;
1338 } 1332 }
@@ -1356,7 +1350,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
1356 break; 1350 break;
1357 } 1351 }
1358 } 1352 }
1359 printk(KERN_INFO "ATOM BIOS: %s\n", name); 1353 pr_info("ATOM BIOS: %s\n", name);
1360 1354
1361 return ctx; 1355 return ctx;
1362} 1356}