aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/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/radeon/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/radeon/atom.c')
-rw-r--r--drivers/gpu/drm/radeon/atom.c46
1 files changed, 20 insertions, 26 deletions
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index f66c33dd21a3..6a2e091aa7b6 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -170,7 +170,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
170 case ATOM_IIO_END: 170 case ATOM_IIO_END:
171 return temp; 171 return temp;
172 default: 172 default:
173 printk(KERN_INFO "Unknown IIO opcode.\n"); 173 pr_info("Unknown IIO opcode\n");
174 return 0; 174 return 0;
175 } 175 }
176} 176}
@@ -194,22 +194,19 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
194 val = gctx->card->reg_read(gctx->card, idx); 194 val = gctx->card->reg_read(gctx->card, idx);
195 break; 195 break;
196 case ATOM_IO_PCI: 196 case ATOM_IO_PCI:
197 printk(KERN_INFO 197 pr_info("PCI registers are not implemented\n");
198 "PCI registers are not implemented.\n");
199 return 0; 198 return 0;
200 case ATOM_IO_SYSIO: 199 case ATOM_IO_SYSIO:
201 printk(KERN_INFO 200 pr_info("SYSIO registers are not implemented\n");
202 "SYSIO registers are not implemented.\n");
203 return 0; 201 return 0;
204 default: 202 default:
205 if (!(gctx->io_mode & 0x80)) { 203 if (!(gctx->io_mode & 0x80)) {
206 printk(KERN_INFO "Bad IO mode.\n"); 204 pr_info("Bad IO mode\n");
207 return 0; 205 return 0;
208 } 206 }
209 if (!gctx->iio[gctx->io_mode & 0x7F]) { 207 if (!gctx->iio[gctx->io_mode & 0x7F]) {
210 printk(KERN_INFO 208 pr_info("Undefined indirect IO read method %d\n",
211 "Undefined indirect IO read method %d.\n", 209 gctx->io_mode & 0x7F);
212 gctx->io_mode & 0x7F);
213 return 0; 210 return 0;
214 } 211 }
215 val = 212 val =
@@ -473,22 +470,19 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
473 gctx->card->reg_write(gctx->card, idx, val); 470 gctx->card->reg_write(gctx->card, idx, val);
474 break; 471 break;
475 case ATOM_IO_PCI: 472 case ATOM_IO_PCI:
476 printk(KERN_INFO 473 pr_info("PCI registers are not implemented\n");
477 "PCI registers are not implemented.\n");
478 return; 474 return;
479 case ATOM_IO_SYSIO: 475 case ATOM_IO_SYSIO:
480 printk(KERN_INFO 476 pr_info("SYSIO registers are not implemented\n");
481 "SYSIO registers are not implemented.\n");
482 return; 477 return;
483 default: 478 default:
484 if (!(gctx->io_mode & 0x80)) { 479 if (!(gctx->io_mode & 0x80)) {
485 printk(KERN_INFO "Bad IO mode.\n"); 480 pr_info("Bad IO mode\n");
486 return; 481 return;
487 } 482 }
488 if (!gctx->iio[gctx->io_mode & 0xFF]) { 483 if (!gctx->iio[gctx->io_mode & 0xFF]) {
489 printk(KERN_INFO 484 pr_info("Undefined indirect IO write method %d\n",
490 "Undefined indirect IO write method %d.\n", 485 gctx->io_mode & 0x7F);
491 gctx->io_mode & 0x7F);
492 return; 486 return;
493 } 487 }
494 atom_iio_execute(gctx, gctx->iio[gctx->io_mode & 0xFF], 488 atom_iio_execute(gctx, gctx->iio[gctx->io_mode & 0xFF],
@@ -819,17 +813,17 @@ static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg)
819 813
820static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg) 814static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
821{ 815{
822 printk(KERN_INFO "unimplemented!\n"); 816 pr_info("unimplemented!\n");
823} 817}
824 818
825static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg) 819static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
826{ 820{
827 printk(KERN_INFO "unimplemented!\n"); 821 pr_info("unimplemented!\n");
828} 822}
829 823
830static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg) 824static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
831{ 825{
832 printk(KERN_INFO "unimplemented!\n"); 826 pr_info("unimplemented!\n");
833} 827}
834 828
835static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg) 829static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg)
@@ -992,7 +986,7 @@ static void atom_op_switch(atom_exec_context *ctx, int *ptr, int arg)
992 } 986 }
993 (*ptr) += 2; 987 (*ptr) += 2;
994 } else { 988 } else {
995 printk(KERN_INFO "Bad case.\n"); 989 pr_info("Bad case\n");
996 return; 990 return;
997 } 991 }
998 (*ptr) += 2; 992 (*ptr) += 2;
@@ -1026,7 +1020,7 @@ static void atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
1026 1020
1027static void atom_op_debug(atom_exec_context *ctx, int *ptr, int arg) 1021static void atom_op_debug(atom_exec_context *ctx, int *ptr, int arg)
1028{ 1022{
1029 printk(KERN_INFO "unimplemented!\n"); 1023 pr_info("unimplemented!\n");
1030} 1024}
1031 1025
1032static struct { 1026static struct {
@@ -1280,14 +1274,14 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
1280 ctx->bios = bios; 1274 ctx->bios = bios;
1281 1275
1282 if (CU16(0) != ATOM_BIOS_MAGIC) { 1276 if (CU16(0) != ATOM_BIOS_MAGIC) {
1283 printk(KERN_INFO "Invalid BIOS magic.\n"); 1277 pr_info("Invalid BIOS magic\n");
1284 kfree(ctx); 1278 kfree(ctx);
1285 return NULL; 1279 return NULL;
1286 } 1280 }
1287 if (strncmp 1281 if (strncmp
1288 (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC, 1282 (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC,
1289 strlen(ATOM_ATI_MAGIC))) { 1283 strlen(ATOM_ATI_MAGIC))) {
1290 printk(KERN_INFO "Invalid ATI magic.\n"); 1284 pr_info("Invalid ATI magic\n");
1291 kfree(ctx); 1285 kfree(ctx);
1292 return NULL; 1286 return NULL;
1293 } 1287 }
@@ -1296,7 +1290,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
1296 if (strncmp 1290 if (strncmp
1297 (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC, 1291 (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC,
1298 strlen(ATOM_ROM_MAGIC))) { 1292 strlen(ATOM_ROM_MAGIC))) {
1299 printk(KERN_INFO "Invalid ATOM magic.\n"); 1293 pr_info("Invalid ATOM magic\n");
1300 kfree(ctx); 1294 kfree(ctx);
1301 return NULL; 1295 return NULL;
1302 } 1296 }
@@ -1320,7 +1314,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
1320 break; 1314 break;
1321 } 1315 }
1322 } 1316 }
1323 printk(KERN_INFO "ATOM BIOS: %s\n", name); 1317 pr_info("ATOM BIOS: %s\n", name);
1324 1318
1325 return ctx; 1319 return ctx;
1326} 1320}