gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level>
authorJoe Perches <joe@perches.com>
Tue, 28 Feb 2017 12:55:52 +0000 (04:55 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:53:24 +0000 (23:53 -0400)
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>
39 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
drivers/gpu/drm/amd/amdgpu/atom.c
drivers/gpu/drm/amd/amdgpu/ci_dpm.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
drivers/gpu/drm/amd/include/amd_pcie_helpers.h
drivers/gpu/drm/radeon/atom.c
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/evergreen_cs.c
drivers/gpu/drm/radeon/ni.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r200.c
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r420.c
drivers/gpu/drm/radeon/r520.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_cs.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_atpx_handler.c
drivers/gpu/drm/radeon/radeon_audio.c
drivers/gpu/drm/radeon/radeon_clocks.c
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/radeon/radeon_gem.c
drivers/gpu/drm/radeon/radeon_test.c
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c
drivers/gpu/drm/radeon/si.c

index 857ba0897159f3052f1623691a229bba9b7402aa..3889486f71fedac5fae12503fa0c3db9e5ffa286 100644 (file)
@@ -74,9 +74,9 @@ static void amdgpu_afmt_calc_cts(uint32_t clock, int *CTS, int *N, int freq)
 
        /* Check that we are in spec (not always possible) */
        if (n < (128*freq/1500))
-               printk(KERN_WARNING "Calculated ACR N value is too small. You may experience audio problems.\n");
+               pr_warn("Calculated ACR N value is too small. You may experience audio problems.\n");
        if (n > (128*freq/300))
-               printk(KERN_WARNING "Calculated ACR N value is too large. You may experience audio problems.\n");
+               pr_warn("Calculated ACR N value is too large. You may experience audio problems.\n");
 
        *N = n;
        *CTS = cts;
index 6c343a9331825452a572a876649dc3b67eba28c4..c13c51af0b681dbb1ee605b978a319ffaa4c7794 100644 (file)
@@ -583,8 +583,8 @@ static bool amdgpu_atpx_detect(void)
 
        if (has_atpx && vga_count == 2) {
                acpi_get_name(amdgpu_atpx_priv.atpx.handle, ACPI_FULL_PATHNAME, &buffer);
-               printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n",
-                      acpi_method_name);
+               pr_info("vga_switcheroo: detected switching method %s handle\n",
+                       acpi_method_name);
                amdgpu_atpx_priv.atpx_detected = true;
                amdgpu_atpx_priv.bridge_pm_usable = d3_supported;
                amdgpu_atpx_init();
index cc01b3f27a1fed5b5ef9555c8a0416c48d2dd8ab..e71a89c73684dabee44efa8c2c1586db2c952d6d 100644 (file)
@@ -1059,7 +1059,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
        if (state == VGA_SWITCHEROO_ON) {
                unsigned d3_delay = dev->pdev->d3_delay;
 
-               printk(KERN_INFO "amdgpu: switched on\n");
+               pr_info("amdgpu: switched on\n");
                /* don't suspend or resume card normally */
                dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 
@@ -1070,7 +1070,7 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
                dev->switch_power_state = DRM_SWITCH_POWER_ON;
                drm_kms_helper_poll_enable(dev);
        } else {
-               printk(KERN_INFO "amdgpu: switched off\n");
+               pr_info("amdgpu: switched off\n");
                drm_kms_helper_poll_disable(dev);
                dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
                amdgpu_device_suspend(dev, true, true);
index bab109e46d228a2c5d01743acdd82df235a39ba3..a48142d930c641437fa2695e4793e7b3a814ec46 100644 (file)
@@ -151,8 +151,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
                                       AMDGPU_GEM_CREATE_VRAM_CLEARED,
                                       true, &gobj);
        if (ret) {
-               printk(KERN_ERR "failed to allocate framebuffer (%d)\n",
-                      aligned_size);
+               pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
                return -ENOMEM;
        }
        abo = gem_to_amdgpu_bo(gobj);
index e05a24325eebf74d912979f1f770d475f4969029..b0483e6e536fa9dc97b6ab4132c6e3c100386690 100644 (file)
@@ -228,7 +228,7 @@ out_unref:
 out_cleanup:
        kfree(gtt_obj);
        if (r) {
-               printk(KERN_WARNING "Error while testing BO move.\n");
+               pr_warn("Error while testing BO move\n");
        }
 }
 
index 1b50e6c13fb3fc2b8136581088ae07e40e8739c3..d1444aaca03815c320f5848bedfafd1ce681b0d4 100644 (file)
@@ -166,7 +166,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                case ATOM_IIO_END:
                        return temp;
                default:
-                       printk(KERN_INFO "Unknown IIO opcode.\n");
+                       pr_info("Unknown IIO opcode\n");
                        return 0;
                }
 }
@@ -190,22 +190,19 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
                        val = gctx->card->reg_read(gctx->card, idx);
                        break;
                case ATOM_IO_PCI:
-                       printk(KERN_INFO
-                              "PCI registers are not implemented.\n");
+                       pr_info("PCI registers are not implemented\n");
                        return 0;
                case ATOM_IO_SYSIO:
-                       printk(KERN_INFO
-                              "SYSIO registers are not implemented.\n");
+                       pr_info("SYSIO registers are not implemented\n");
                        return 0;
                default:
                        if (!(gctx->io_mode & 0x80)) {
-                               printk(KERN_INFO "Bad IO mode.\n");
+                               pr_info("Bad IO mode\n");
                                return 0;
                        }
                        if (!gctx->iio[gctx->io_mode & 0x7F]) {
-                               printk(KERN_INFO
-                                      "Undefined indirect IO read method %d.\n",
-                                      gctx->io_mode & 0x7F);
+                               pr_info("Undefined indirect IO read method %d\n",
+                                       gctx->io_mode & 0x7F);
                                return 0;
                        }
                        val =
@@ -469,22 +466,19 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
                                gctx->card->reg_write(gctx->card, idx, val);
                        break;
                case ATOM_IO_PCI:
-                       printk(KERN_INFO
-                              "PCI registers are not implemented.\n");
+                       pr_info("PCI registers are not implemented\n");
                        return;
                case ATOM_IO_SYSIO:
-                       printk(KERN_INFO
-                              "SYSIO registers are not implemented.\n");
+                       pr_info("SYSIO registers are not implemented\n");
                        return;
                default:
                        if (!(gctx->io_mode & 0x80)) {
-                               printk(KERN_INFO "Bad IO mode.\n");
+                               pr_info("Bad IO mode\n");
                                return;
                        }
                        if (!gctx->iio[gctx->io_mode & 0xFF]) {
-                               printk(KERN_INFO
-                                      "Undefined indirect IO write method %d.\n",
-                                      gctx->io_mode & 0x7F);
+                               pr_info("Undefined indirect IO write method %d\n",
+                                       gctx->io_mode & 0x7F);
                                return;
                        }
                        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)
 
 static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static 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)
                        }
                        (*ptr) += 2;
                } else {
-                       printk(KERN_INFO "Bad case.\n");
+                       pr_info("Bad case\n");
                        return;
                }
        (*ptr) += 2;
@@ -1316,14 +1310,14 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
        ctx->bios = bios;
 
        if (CU16(0) != ATOM_BIOS_MAGIC) {
-               printk(KERN_INFO "Invalid BIOS magic.\n");
+               pr_info("Invalid BIOS magic\n");
                kfree(ctx);
                return NULL;
        }
        if (strncmp
            (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC,
             strlen(ATOM_ATI_MAGIC))) {
-               printk(KERN_INFO "Invalid ATI magic.\n");
+               pr_info("Invalid ATI magic\n");
                kfree(ctx);
                return NULL;
        }
@@ -1332,7 +1326,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
        if (strncmp
            (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC,
             strlen(ATOM_ROM_MAGIC))) {
-               printk(KERN_INFO "Invalid ATOM magic.\n");
+               pr_info("Invalid ATOM magic\n");
                kfree(ctx);
                return NULL;
        }
@@ -1356,7 +1350,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
                        break;
                }
        }
-       printk(KERN_INFO "ATOM BIOS: %s\n", name);
+       pr_info("ATOM BIOS: %s\n", name);
 
        return ctx;
 }
index b00e81db522d8bfb7e239fa8afd461a0cc32b103..c8cb964091257a9a58486a4754e016f5cc971a8a 100644 (file)
@@ -5840,9 +5840,7 @@ static int ci_dpm_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "cik_smc: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("cik_smc: Failed to load firmware \"%s\"\n", fw_name);
                release_firmware(adev->pm.fw);
                adev->pm.fw = NULL;
        }
index 810bba5339753ccfd28c176f15e8f347b84a361d..c33bc1bb46552dd94b1a9d0c6d3361c9131677b5 100644 (file)
@@ -142,9 +142,7 @@ static int cik_sdma_init_microcode(struct amdgpu_device *adev)
        }
 out:
        if (err) {
-               printk(KERN_ERR
-                      "cik_sdma: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("cik_sdma: Failed to load firmware \"%s\"\n", fw_name);
                for (i = 0; i < adev->sdma.num_instances; i++) {
                        release_firmware(adev->sdma.instance[i].fw);
                        adev->sdma.instance[i].fw = NULL;
index e78433799a6d8d7e6798d9a629e8799f383457c5..02ca2322c30bce37230e029fe7aef7cc90c05d09 100644 (file)
@@ -378,9 +378,7 @@ static int gfx_v6_0_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "gfx6: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("gfx6: Failed to load firmware \"%s\"\n", fw_name);
                release_firmware(adev->gfx.pfp_fw);
                adev->gfx.pfp_fw = NULL;
                release_firmware(adev->gfx.me_fw);
index 286d6763afa735b046e85e3b09a96683f71df0e7..e471c08dd249d57eea6a5ea99aff6201ad85fe81 100644 (file)
@@ -972,9 +972,7 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "gfx7: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("gfx7: Failed to load firmware \"%s\"\n", fw_name);
                release_firmware(adev->gfx.pfp_fw);
                adev->gfx.pfp_fw = NULL;
                release_firmware(adev->gfx.me_fw);
index 4b38d062cbe471bed53a050ff194640d213e2749..552bf6b7851cfba3a96e4a4320803b3b4eb86d4d 100644 (file)
@@ -161,9 +161,7 @@ static int gmc_v7_0_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "cik_mc: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("cik_mc: Failed to load firmware \"%s\"\n", fw_name);
                release_firmware(adev->mc.fw);
                adev->mc.fw = NULL;
        }
@@ -994,12 +992,12 @@ static int gmc_v7_0_sw_init(void *handle)
        if (r) {
                adev->need_dma32 = true;
                dma_bits = 32;
-               printk(KERN_WARNING "amdgpu: No suitable DMA available.\n");
+               pr_warn("amdgpu: No suitable DMA available\n");
        }
        r = pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
        if (r) {
                pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
-               printk(KERN_WARNING "amdgpu: No coherent DMA available.\n");
+               pr_warn("amdgpu: No coherent DMA available\n");
        }
 
        r = gmc_v7_0_init_microcode(adev);
index 6e32f28eafde4abcea5a78a29e40e0964954a0b0..f2bd0164bdfdafa4ba542f395306ef5a31c5a45c 100644 (file)
@@ -245,9 +245,7 @@ static int gmc_v8_0_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "mc: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("mc: Failed to load firmware \"%s\"\n", fw_name);
                release_firmware(adev->mc.fw);
                adev->mc.fw = NULL;
        }
@@ -1006,12 +1004,12 @@ static int gmc_v8_0_sw_init(void *handle)
        if (r) {
                adev->need_dma32 = true;
                dma_bits = 32;
-               printk(KERN_WARNING "amdgpu: No suitable DMA available.\n");
+               pr_warn("amdgpu: No suitable DMA available\n");
        }
        r = pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(dma_bits));
        if (r) {
                pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));
-               printk(KERN_WARNING "amdgpu: No coherent DMA available.\n");
+               pr_warn("amdgpu: No coherent DMA available\n");
        }
 
        r = gmc_v8_0_init_microcode(adev);
index 896be64b70133e9b67e8dd00a29afa2d9febff6d..a881cf475a19eaad1a33c7cebd8ee64649305e66 100644 (file)
@@ -170,9 +170,7 @@ static int sdma_v2_4_init_microcode(struct amdgpu_device *adev)
 
 out:
        if (err) {
-               printk(KERN_ERR
-                      "sdma_v2_4: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("sdma_v2_4: Failed to load firmware \"%s\"\n", fw_name);
                for (i = 0; i < adev->sdma.num_instances; i++) {
                        release_firmware(adev->sdma.instance[i].fw);
                        adev->sdma.instance[i].fw = NULL;
index 1ac876fe3d5ad114f6b3cba934a89603eca660ca..c4d7dd7f73a8828b3d7ec37f99b0d3cd5a933132 100644 (file)
@@ -321,9 +321,7 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
        }
 out:
        if (err) {
-               printk(KERN_ERR
-                      "sdma_v3_0: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("sdma_v3_0: Failed to load firmware \"%s\"\n", fw_name);
                for (i = 0; i < adev->sdma.num_instances; i++) {
                        release_firmware(adev->sdma.instance[i].fw);
                        adev->sdma.instance[i].fw = NULL;
index 5725bf85eacc1728f8c483e29ff141d6c76529de..7e5a965450c7b1de94384913217a4ffe46d69371 100644 (file)
@@ -82,7 +82,7 @@ static inline uint16_t get_pcie_lane_support(uint32_t pcie_lane_width_cap,
 
        switch (pcie_lane_width_cap) {
        case 0:
-               printk(KERN_ERR "No valid PCIE lane width reported");
+               pr_err("No valid PCIE lane width reported\n");
                break;
        case CAIL_PCIE_LINK_WIDTH_SUPPORT_X1:
                new_pcie_lanes = 1;
@@ -126,7 +126,7 @@ static inline uint16_t get_pcie_lane_support(uint32_t pcie_lane_width_cap,
                                                        }
                                                }
                                                if (j > 7)
-                                                       printk(KERN_ERR "Cannot find a valid PCIE lane width!");
+                                                       pr_err("Cannot find a valid PCIE lane width!\n");
                                        }
                                }
                                break;
index f66c33dd21a317e7abc20887cec1659f7bb0f712..6a2e091aa7b637c2ba19a779e2b7d59e00f7d41b 100644 (file)
@@ -170,7 +170,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
                case ATOM_IIO_END:
                        return temp;
                default:
-                       printk(KERN_INFO "Unknown IIO opcode.\n");
+                       pr_info("Unknown IIO opcode\n");
                        return 0;
                }
 }
@@ -194,22 +194,19 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
                        val = gctx->card->reg_read(gctx->card, idx);
                        break;
                case ATOM_IO_PCI:
-                       printk(KERN_INFO
-                              "PCI registers are not implemented.\n");
+                       pr_info("PCI registers are not implemented\n");
                        return 0;
                case ATOM_IO_SYSIO:
-                       printk(KERN_INFO
-                              "SYSIO registers are not implemented.\n");
+                       pr_info("SYSIO registers are not implemented\n");
                        return 0;
                default:
                        if (!(gctx->io_mode & 0x80)) {
-                               printk(KERN_INFO "Bad IO mode.\n");
+                               pr_info("Bad IO mode\n");
                                return 0;
                        }
                        if (!gctx->iio[gctx->io_mode & 0x7F]) {
-                               printk(KERN_INFO
-                                      "Undefined indirect IO read method %d.\n",
-                                      gctx->io_mode & 0x7F);
+                               pr_info("Undefined indirect IO read method %d\n",
+                                       gctx->io_mode & 0x7F);
                                return 0;
                        }
                        val =
@@ -473,22 +470,19 @@ static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
                                gctx->card->reg_write(gctx->card, idx, val);
                        break;
                case ATOM_IO_PCI:
-                       printk(KERN_INFO
-                              "PCI registers are not implemented.\n");
+                       pr_info("PCI registers are not implemented\n");
                        return;
                case ATOM_IO_SYSIO:
-                       printk(KERN_INFO
-                              "SYSIO registers are not implemented.\n");
+                       pr_info("SYSIO registers are not implemented\n");
                        return;
                default:
                        if (!(gctx->io_mode & 0x80)) {
-                               printk(KERN_INFO "Bad IO mode.\n");
+                               pr_info("Bad IO mode\n");
                                return;
                        }
                        if (!gctx->iio[gctx->io_mode & 0xFF]) {
-                               printk(KERN_INFO
-                                      "Undefined indirect IO write method %d.\n",
-                                      gctx->io_mode & 0x7F);
+                               pr_info("Undefined indirect IO write method %d\n",
+                                       gctx->io_mode & 0x7F);
                                return;
                        }
                        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)
 
 static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static 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)
                        }
                        (*ptr) += 2;
                } else {
-                       printk(KERN_INFO "Bad case.\n");
+                       pr_info("Bad case\n");
                        return;
                }
        (*ptr) += 2;
@@ -1026,7 +1020,7 @@ static void atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
 
 static void atom_op_debug(atom_exec_context *ctx, int *ptr, int arg)
 {
-       printk(KERN_INFO "unimplemented!\n");
+       pr_info("unimplemented!\n");
 }
 
 static struct {
@@ -1280,14 +1274,14 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
        ctx->bios = bios;
 
        if (CU16(0) != ATOM_BIOS_MAGIC) {
-               printk(KERN_INFO "Invalid BIOS magic.\n");
+               pr_info("Invalid BIOS magic\n");
                kfree(ctx);
                return NULL;
        }
        if (strncmp
            (CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC,
             strlen(ATOM_ATI_MAGIC))) {
-               printk(KERN_INFO "Invalid ATI magic.\n");
+               pr_info("Invalid ATI magic\n");
                kfree(ctx);
                return NULL;
        }
@@ -1296,7 +1290,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
        if (strncmp
            (CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC,
             strlen(ATOM_ROM_MAGIC))) {
-               printk(KERN_INFO "Invalid ATOM magic.\n");
+               pr_info("Invalid ATOM magic\n");
                kfree(ctx);
                return NULL;
        }
@@ -1320,7 +1314,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
                        break;
                }
        }
-       printk(KERN_INFO "ATOM BIOS: %s\n", name);
+       pr_info("ATOM BIOS: %s\n", name);
 
        return ctx;
 }
index ac0d93936d77c8f3d3538895801c24588841cf71..53710dd7d5dd55a020c813bc5b4c020c3ba55d23 100644 (file)
@@ -2072,8 +2072,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->pfp_fw->size != pfp_req_size) {
-                       printk(KERN_ERR
-                              "cik_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->pfp_fw->size, fw_name);
                        err = -EINVAL;
                        goto out;
@@ -2081,8 +2080,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
        } else {
                err = radeon_ucode_validate(rdev->pfp_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2098,16 +2096,14 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->me_fw->size != me_req_size) {
-                       printk(KERN_ERR
-                              "cik_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->me_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->me_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2123,16 +2119,14 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->ce_fw->size != ce_req_size) {
-                       printk(KERN_ERR
-                              "cik_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->ce_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->ce_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2148,16 +2142,14 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->mec_fw->size != mec_req_size) {
-                       printk(KERN_ERR
-                              "cik_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->mec_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->mec_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2188,16 +2180,14 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->rlc_fw->size != rlc_req_size) {
-                       printk(KERN_ERR
-                              "cik_rlc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_rlc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->rlc_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->rlc_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2213,16 +2203,14 @@ static int cik_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->sdma_fw->size != sdma_req_size) {
-                       printk(KERN_ERR
-                              "cik_sdma: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("cik_sdma: Bogus length %zu in firmware \"%s\"\n",
                               rdev->sdma_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->sdma_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "cik_fw: validation failed for firmware \"%s\"\n",
+                       pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -2245,8 +2233,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
                        }
                        if ((rdev->mc_fw->size != mc_req_size) &&
                            (rdev->mc_fw->size != mc2_req_size)){
-                               printk(KERN_ERR
-                                      "cik_mc: Bogus length %zu in firmware \"%s\"\n",
+                               pr_err("cik_mc: Bogus length %zu in firmware \"%s\"\n",
                                       rdev->mc_fw->size, fw_name);
                                err = -EINVAL;
                        }
@@ -2254,8 +2241,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
                } else {
                        err = radeon_ucode_validate(rdev->mc_fw);
                        if (err) {
-                               printk(KERN_ERR
-                                      "cik_fw: validation failed for firmware \"%s\"\n",
+                               pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                                       fw_name);
                                goto out;
                        } else {
@@ -2272,23 +2258,20 @@ static int cik_init_microcode(struct radeon_device *rdev)
                        snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
                        err = request_firmware(&rdev->smc_fw, fw_name, rdev->dev);
                        if (err) {
-                               printk(KERN_ERR
-                                      "smc: error loading firmware \"%s\"\n",
+                               pr_err("smc: error loading firmware \"%s\"\n",
                                       fw_name);
                                release_firmware(rdev->smc_fw);
                                rdev->smc_fw = NULL;
                                err = 0;
                        } else if (rdev->smc_fw->size != smc_req_size) {
-                               printk(KERN_ERR
-                                      "cik_smc: Bogus length %zu in firmware \"%s\"\n",
+                               pr_err("cik_smc: Bogus length %zu in firmware \"%s\"\n",
                                       rdev->smc_fw->size, fw_name);
                                err = -EINVAL;
                        }
                } else {
                        err = radeon_ucode_validate(rdev->smc_fw);
                        if (err) {
-                               printk(KERN_ERR
-                                      "cik_fw: validation failed for firmware \"%s\"\n",
+                               pr_err("cik_fw: validation failed for firmware \"%s\"\n",
                                       fw_name);
                                goto out;
                        } else {
@@ -2300,7 +2283,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
        if (new_fw == 0) {
                rdev->new_fw = false;
        } else if (new_fw < num_fw) {
-               printk(KERN_ERR "ci_fw: mixing new and old firmware!\n");
+               pr_err("ci_fw: mixing new and old firmware!\n");
                err = -EINVAL;
        } else {
                rdev->new_fw = true;
@@ -2309,8 +2292,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
 out:
        if (err) {
                if (err != -EINVAL)
-                       printk(KERN_ERR
-                              "cik_cp: Failed to load firmware \"%s\"\n",
+                       pr_err("cik_cp: Failed to load firmware \"%s\"\n",
                               fw_name);
                release_firmware(rdev->pfp_fw);
                rdev->pfp_fw = NULL;
index 0b6b5766216faa525728abcc31b157ca95e5a6ee..d1b1e0cc3c25b773f32ccc74c9401cf99b363c84 100644 (file)
@@ -2486,7 +2486,7 @@ void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev)
                tmp = RREG32(VM_CONTEXT0_REQUEST_RESPONSE);
                tmp = (tmp & RESPONSE_TYPE_MASK) >> RESPONSE_TYPE_SHIFT;
                if (tmp == 2) {
-                       printk(KERN_WARNING "[drm] r600 flush TLB failed\n");
+                       pr_warn("[drm] r600 flush TLB failed\n");
                        return;
                }
                if (tmp) {
index f8b05090232a9d3b23c85f379a98259cc6a42f36..54324330b91f43a25f33617e8bb47b7203339f98 100644 (file)
@@ -1061,8 +1061,7 @@ static int evergreen_packet0_check(struct radeon_cs_parser *p,
                }
                break;
        default:
-               printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
-                      reg, idx);
+               pr_err("Forbidden register 0x%04X in cs at %d\n", reg, idx);
                return -EINVAL;
        }
        return 0;
@@ -2776,7 +2775,7 @@ int evergreen_cs_parse(struct radeon_cs_parser *p)
        } while (p->idx < p->chunk_ib->length_dw);
 #if 0
        for (r = 0; r < p->ib.length_dw; r++) {
-               printk(KERN_INFO "%05d  0x%08X\n", r, p->ib.ptr[r]);
+               pr_info("%05d  0x%08X\n", r, p->ib.ptr[r]);
                mdelay(1);
        }
 #endif
@@ -3215,7 +3214,7 @@ int evergreen_dma_cs_parse(struct radeon_cs_parser *p)
        } while (p->idx < p->chunk_ib->length_dw);
 #if 0
        for (r = 0; r < p->ib->length_dw; r++) {
-               printk(KERN_INFO "%05d  0x%08X\n", r, p->ib.ptr[r]);
+               pr_info("%05d  0x%08X\n", r, p->ib.ptr[r]);
                mdelay(1);
        }
 #endif
index a0d4a0522fdc98582e99b1016d482de148e62f16..9eccd0c81d8815fc30a16da28b2e6360b3a69e8f 100644 (file)
@@ -774,8 +774,7 @@ int ni_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->pfp_fw->size != pfp_req_size) {
-               printk(KERN_ERR
-                      "ni_cp: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("ni_cp: Bogus length %zu in firmware \"%s\"\n",
                       rdev->pfp_fw->size, fw_name);
                err = -EINVAL;
                goto out;
@@ -786,8 +785,7 @@ int ni_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->me_fw->size != me_req_size) {
-               printk(KERN_ERR
-                      "ni_cp: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("ni_cp: Bogus length %zu in firmware \"%s\"\n",
                       rdev->me_fw->size, fw_name);
                err = -EINVAL;
        }
@@ -797,8 +795,7 @@ int ni_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->rlc_fw->size != rlc_req_size) {
-               printk(KERN_ERR
-                      "ni_rlc: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("ni_rlc: Bogus length %zu in firmware \"%s\"\n",
                       rdev->rlc_fw->size, fw_name);
                err = -EINVAL;
        }
@@ -810,8 +807,7 @@ int ni_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->mc_fw->size != mc_req_size) {
-                       printk(KERN_ERR
-                              "ni_mc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("ni_mc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->mc_fw->size, fw_name);
                        err = -EINVAL;
                }
@@ -821,15 +817,12 @@ int ni_init_microcode(struct radeon_device *rdev)
                snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
                err = request_firmware(&rdev->smc_fw, fw_name, rdev->dev);
                if (err) {
-                       printk(KERN_ERR
-                              "smc: error loading firmware \"%s\"\n",
-                              fw_name);
+                       pr_err("smc: error loading firmware \"%s\"\n", fw_name);
                        release_firmware(rdev->smc_fw);
                        rdev->smc_fw = NULL;
                        err = 0;
                } else if (rdev->smc_fw->size != smc_req_size) {
-                       printk(KERN_ERR
-                              "ni_mc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("ni_mc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->mc_fw->size, fw_name);
                        err = -EINVAL;
                }
@@ -838,8 +831,7 @@ int ni_init_microcode(struct radeon_device *rdev)
 out:
        if (err) {
                if (err != -EINVAL)
-                       printk(KERN_ERR
-                              "ni_cp: Failed to load firmware \"%s\"\n",
+                       pr_err("ni_cp: Failed to load firmware \"%s\"\n",
                               fw_name);
                release_firmware(rdev->pfp_fw);
                rdev->pfp_fw = NULL;
index e3399310d41dc1c8cb40229e13a78aad5759d50a..aefca0b03f3827fde12ff836e88aadacd503851e 100644 (file)
@@ -1042,11 +1042,9 @@ static int r100_cp_init_microcode(struct radeon_device *rdev)
 
        err = request_firmware(&rdev->me_fw, fw_name, rdev->dev);
        if (err) {
-               printk(KERN_ERR "radeon_cp: Failed to load firmware \"%s\"\n",
-                      fw_name);
+               pr_err("radeon_cp: Failed to load firmware \"%s\"\n", fw_name);
        } else if (rdev->me_fw->size % 8) {
-               printk(KERN_ERR
-                      "radeon_cp: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("radeon_cp: Bogus length %zu in firmware \"%s\"\n",
                       rdev->me_fw->size, fw_name);
                err = -EINVAL;
                release_firmware(rdev->me_fw);
@@ -1087,8 +1085,7 @@ static void r100_cp_load_microcode(struct radeon_device *rdev)
        int i, size;
 
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
 
        if (rdev->me_fw) {
@@ -1246,8 +1243,7 @@ void r100_cp_disable(struct radeon_device *rdev)
        WREG32(RADEON_CP_CSQ_CNTL, 0);
        WREG32(R_000770_SCRATCH_UMSK, 0);
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
 }
 
@@ -1881,8 +1877,7 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
                track->tex_dirty = true;
                break;
        default:
-               printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
-                      reg, idx);
+               pr_err("Forbidden register 0x%04X in cs at %d\n", reg, idx);
                return -EINVAL;
        }
        return 0;
@@ -2486,8 +2481,7 @@ int r100_gui_wait_for_idle(struct radeon_device *rdev)
        uint32_t tmp;
 
        if (r100_rbbm_fifo_wait_for_entry(rdev, 64)) {
-               printk(KERN_WARNING "radeon: wait for empty RBBM fifo failed !"
-                      " Bad things might happen.\n");
+               pr_warn("radeon: wait for empty RBBM fifo failed! Bad things might happen.\n");
        }
        for (i = 0; i < rdev->usec_timeout; i++) {
                tmp = RREG32(RADEON_RBBM_STATUS);
index c70e6d5bcd198ce139f4eae2c842044da998b0e3..c22321cc5a4158fd9fc628e1c0ac2195247aed55 100644 (file)
@@ -537,8 +537,7 @@ int r200_packet0_check(struct radeon_cs_parser *p,
                track->tex_dirty = true;
                break;
        default:
-               printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
-                      reg, idx);
+               pr_err("Forbidden register 0x%04X in cs at %d\n", reg, idx);
                return -EINVAL;
        }
        return 0;
index 7e417d8dc733157c1c3c397246619334c1cc3cc9..21161aa8acbf202d196a0ed7949a4659f4cf8269 100644 (file)
@@ -387,8 +387,7 @@ static void r300_gpu_init(struct radeon_device *rdev)
        WREG32(R300_GB_TILE_CONFIG, gb_tile_config);
 
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
 
        tmp = RREG32(R300_DST_PIPE_CONFIG);
@@ -399,14 +398,12 @@ static void r300_gpu_init(struct radeon_device *rdev)
               R300_DC_DC_DISABLE_IGNORE_PE);
 
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
        if (r300_mc_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait MC idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait MC idle while programming pipes. Bad things might happen.\n");
        }
-       DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized.\n",
+       DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized\n",
                 rdev->num_gb_pipes, rdev->num_z_pipes);
 }
 
@@ -1165,7 +1162,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
        }
        return 0;
 fail:
-       printk(KERN_ERR "Forbidden register 0x%04X in cs at %d (val=%08x)\n",
+       pr_err("Forbidden register 0x%04X in cs at %d (val=%08x)\n",
               reg, idx, idx_value);
        return -EINVAL;
 }
index 2828605aef3fcdeb76b529e7b478bdc866d1a27f..3eb0c4f9f7960d2fbcfbbd86de480f9fcc97f914 100644 (file)
@@ -92,8 +92,7 @@ void r420_pipes_init(struct radeon_device *rdev)
               (1 << 2) | (1 << 3));
        /* add idle wait as per freedesktop.org bug 24041 */
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
        /* get max number of pipes */
        gb_pipe_select = RREG32(R400_GB_PIPE_SELECT);
@@ -128,8 +127,7 @@ void r420_pipes_init(struct radeon_device *rdev)
        tmp |= R300_TILE_SIZE_16 | R300_ENABLE_TILING;
        WREG32(R300_GB_TILE_CONFIG, tmp);
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
 
        tmp = RREG32(R300_DST_PIPE_CONFIG);
@@ -141,8 +139,7 @@ void r420_pipes_init(struct radeon_device *rdev)
               R300_DC_DC_DISABLE_IGNORE_PE);
 
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while programming pipes. Bad things might happen.\n");
        }
 
        if (rdev->family == CHIP_RV530) {
index 98d6053c36c678aaf598e7a0b63193d00d042f5b..074cf752faef6372a2341e9a810e7244bd63528d 100644 (file)
@@ -86,8 +86,7 @@ static void r520_gpu_init(struct radeon_device *rdev)
              (((gb_pipe_select >> 8) & 0xF) << 4);
        WREG32_PLL(0x000D, tmp);
        if (r520_mc_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait MC idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait MC idle while programming pipes. Bad things might happen.\n");
        }
 }
 
index a951881c2a504050c001b9c9e9830ec691b13424..0a085176e79b35b2887c19f7b33091804b58e645 100644 (file)
@@ -1094,7 +1094,7 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev)
                tmp = RREG32(VM_CONTEXT0_REQUEST_RESPONSE);
                tmp = (tmp & RESPONSE_TYPE_MASK) >> RESPONSE_TYPE_SHIFT;
                if (tmp == 2) {
-                       printk(KERN_WARNING "[drm] r600 flush TLB failed\n");
+                       pr_warn("[drm] r600 flush TLB failed\n");
                        return;
                }
                if (tmp) {
@@ -2550,8 +2550,7 @@ int r600_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->pfp_fw->size != pfp_req_size) {
-               printk(KERN_ERR
-                      "r600_cp: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n",
                       rdev->pfp_fw->size, fw_name);
                err = -EINVAL;
                goto out;
@@ -2562,8 +2561,7 @@ int r600_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->me_fw->size != me_req_size) {
-               printk(KERN_ERR
-                      "r600_cp: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n",
                       rdev->me_fw->size, fw_name);
                err = -EINVAL;
        }
@@ -2573,8 +2571,7 @@ int r600_init_microcode(struct radeon_device *rdev)
        if (err)
                goto out;
        if (rdev->rlc_fw->size != rlc_req_size) {
-               printk(KERN_ERR
-                      "r600_rlc: Bogus length %zu in firmware \"%s\"\n",
+               pr_err("r600_rlc: Bogus length %zu in firmware \"%s\"\n",
                       rdev->rlc_fw->size, fw_name);
                err = -EINVAL;
        }
@@ -2583,15 +2580,12 @@ int r600_init_microcode(struct radeon_device *rdev)
                snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", smc_chip_name);
                err = request_firmware(&rdev->smc_fw, fw_name, rdev->dev);
                if (err) {
-                       printk(KERN_ERR
-                              "smc: error loading firmware \"%s\"\n",
-                              fw_name);
+                       pr_err("smc: error loading firmware \"%s\"\n", fw_name);
                        release_firmware(rdev->smc_fw);
                        rdev->smc_fw = NULL;
                        err = 0;
                } else if (rdev->smc_fw->size != smc_req_size) {
-                       printk(KERN_ERR
-                              "smc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("smc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->smc_fw->size, fw_name);
                        err = -EINVAL;
                }
@@ -2600,8 +2594,7 @@ int r600_init_microcode(struct radeon_device *rdev)
 out:
        if (err) {
                if (err != -EINVAL)
-                       printk(KERN_ERR
-                              "r600_cp: Failed to load firmware \"%s\"\n",
+                       pr_err("r600_cp: Failed to load firmware \"%s\"\n",
                               fw_name);
                release_firmware(rdev->pfp_fw);
                rdev->pfp_fw = NULL;
index 595a19736458ad79a6d30571dffd9e3a9b10a1f3..97fd58e9704308a04c590c240a851f91b189f251 100644 (file)
@@ -932,8 +932,7 @@ static int r600_packet0_check(struct radeon_cs_parser *p,
                }
                break;
        default:
-               printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
-                      reg, idx);
+               pr_err("Forbidden register 0x%04X in cs at %d\n", reg, idx);
                return -EINVAL;
        }
        return 0;
@@ -2320,7 +2319,7 @@ int r600_cs_parse(struct radeon_cs_parser *p)
        } while (p->idx < p->chunk_ib->length_dw);
 #if 0
        for (r = 0; r < p->ib.length_dw; r++) {
-               printk(KERN_INFO "%05d  0x%08X\n", r, p->ib.ptr[r]);
+               pr_info("%05d  0x%08X\n", r, p->ib.ptr[r]);
                mdelay(1);
        }
 #endif
@@ -2528,7 +2527,7 @@ int r600_dma_cs_parse(struct radeon_cs_parser *p)
        } while (p->idx < p->chunk_ib->length_dw);
 #if 0
        for (r = 0; r < p->ib->length_dw; r++) {
-               printk(KERN_INFO "%05d  0x%08X\n", r, p->ib.ptr[r]);
+               pr_info("%05d  0x%08X\n", r, p->ib.ptr[r]);
                mdelay(1);
        }
 #endif
index 44e0c5ed6418bfd286849071453a3049f157503a..2e400dc414e378eed907b55069d20ac7ae6868e9 100644 (file)
@@ -2535,7 +2535,8 @@ static inline struct radeon_fence *to_radeon_fence(struct dma_fence *f)
 #define WREG16(reg, v) writew(v, (rdev->rmmio) + (reg))
 #define RREG32(reg) r100_mm_rreg(rdev, (reg), false)
 #define RREG32_IDX(reg) r100_mm_rreg(rdev, (reg), true)
-#define DREG32(reg) printk(KERN_INFO "REGISTER: " #reg " : 0x%08X\n", r100_mm_rreg(rdev, (reg), false))
+#define DREG32(reg) pr_info("REGISTER: " #reg " : 0x%08X\n",   \
+                           r100_mm_rreg(rdev, (reg), false))
 #define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false)
 #define WREG32_IDX(reg, v) r100_mm_wreg(rdev, (reg), (v), true)
 #define REG_SET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK)
index 0ae13cd2addaa2f4e53a9b69903c3095912d8460..40be4068ca69b67a89e4d96cf72a9d3ab4921ac5 100644 (file)
@@ -577,8 +577,8 @@ static bool radeon_atpx_detect(void)
 
        if (has_atpx && vga_count == 2) {
                acpi_get_name(radeon_atpx_priv.atpx.handle, ACPI_FULL_PATHNAME, &buffer);
-               printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n",
-                      acpi_method_name);
+               pr_info("vga_switcheroo: detected switching method %s handle\n",
+                       acpi_method_name);
                radeon_atpx_priv.atpx_detected = true;
                radeon_atpx_priv.bridge_pm_usable = d3_supported;
                radeon_atpx_init();
index b214663b370da00905faa882ea27513153aa91bd..aaacac190d2688789928a24b0efbc8c92cb5aba3 100644 (file)
@@ -576,9 +576,9 @@ static void radeon_audio_calc_cts(unsigned int clock, int *CTS, int *N, int freq
 
        /* Check that we are in spec (not always possible) */
        if (n < (128*freq/1500))
-               printk(KERN_WARNING "Calculated ACR N value is too small. You may experience audio problems.\n");
+               pr_warn("Calculated ACR N value is too small. You may experience audio problems.\n");
        if (n > (128*freq/300))
-               printk(KERN_WARNING "Calculated ACR N value is too large. You may experience audio problems.\n");
+               pr_warn("Calculated ACR N value is too large. You may experience audio problems.\n");
 
        *N = n;
        *CTS = cts;
index c1135feb93c19ad061a61e73caa78df1f88fc59c..e55146cdf543f2620eea0d19f5373bf2adafe9ea 100644 (file)
@@ -111,7 +111,7 @@ static bool radeon_read_clocks_OF(struct drm_device *dev)
                return false;
        val = of_get_property(dp, "ATY,RefCLK", NULL);
        if (!val || !*val) {
-               printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n");
+               pr_warn("radeonfb: No ATY,RefCLK property !\n");
                return false;
        }
        p1pll->reference_freq = p2pll->reference_freq = (*val) / 10;
index 4b0c388be3f511e771874a8dd7917fcadb91e817..dde59c36ba92e9b1cade405222203adb6e7d1c8e 100644 (file)
@@ -1249,7 +1249,7 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
        if (state == VGA_SWITCHEROO_ON) {
                unsigned d3_delay = dev->pdev->d3_delay;
 
-               printk(KERN_INFO "radeon: switched on\n");
+               pr_info("radeon: switched on\n");
                /* don't suspend or resume card normally */
                dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 
@@ -1263,7 +1263,7 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero
                dev->switch_power_state = DRM_SWITCH_POWER_ON;
                drm_kms_helper_poll_enable(dev);
        } else {
-               printk(KERN_INFO "radeon: switched off\n");
+               pr_info("radeon: switched off\n");
                drm_kms_helper_poll_disable(dev);
                dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
                radeon_suspend_kms(dev, true, true, false);
@@ -1410,12 +1410,12 @@ int radeon_device_init(struct radeon_device *rdev,
        if (r) {
                rdev->need_dma32 = true;
                dma_bits = 32;
-               printk(KERN_WARNING "radeon: No suitable DMA available.\n");
+               pr_warn("radeon: No suitable DMA available\n");
        }
        r = pci_set_consistent_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
        if (r) {
                pci_set_consistent_dma_mask(rdev->pdev, DMA_BIT_MASK(32));
-               printk(KERN_WARNING "radeon: No coherent DMA available.\n");
+               pr_warn("radeon: No coherent DMA available\n");
        }
 
        /* Registers mapping */
index 8d28fe6a280a0a016b4fc43b85a9e134368ca836..356ad90a52383a755ffa168c2b7209d449232a1e 100644 (file)
@@ -149,8 +149,7 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
                                       RADEON_GEM_DOMAIN_VRAM,
                                       0, true, &gobj);
        if (ret) {
-               printk(KERN_ERR "failed to allocate framebuffer (%d)\n",
-                      aligned_size);
+               pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
                return -ENOMEM;
        }
        rbo = gem_to_radeon_bo(gobj);
index 96683f5b2b1b722db08de97550aa8cdf99444a1c..9b0b123ce0795175bebda639cd39bc49f8b7696c 100644 (file)
@@ -106,7 +106,7 @@ static int radeon_gem_set_domain(struct drm_gem_object *gobj,
        }
        if (!domain) {
                /* Do nothings */
-               printk(KERN_WARNING "Set domain without domain !\n");
+               pr_warn("Set domain without domain !\n");
                return 0;
        }
        if (domain == RADEON_GEM_DOMAIN_CPU) {
@@ -116,7 +116,7 @@ static int radeon_gem_set_domain(struct drm_gem_object *gobj,
                        r = -EBUSY;
 
                if (r < 0 && r != -EINTR) {
-                       printk(KERN_ERR "Failed to wait for object: %li\n", r);
+                       pr_err("Failed to wait for object: %li\n", r);
                        return r;
                }
        }
index 791818165c761f7fdc1807b8f0b7e22de0aed24f..4fdc7bda7a7d5c85612b51c0630014e365d6a1e9 100644 (file)
@@ -246,7 +246,7 @@ out_unref:
 out_cleanup:
        kfree(gtt_obj);
        if (r) {
-               printk(KERN_WARNING "Error while testing BO move.\n");
+               pr_warn("Error while testing BO move\n");
        }
 }
 
@@ -394,7 +394,7 @@ out_cleanup:
                radeon_fence_unref(&fence2);
 
        if (r)
-               printk(KERN_WARNING "Error while testing ring sync (%d).\n", r);
+               pr_warn("Error while testing ring sync (%d)\n", r);
 }
 
 static void radeon_test_ring_sync2(struct radeon_device *rdev,
@@ -504,7 +504,7 @@ out_cleanup:
                radeon_fence_unref(&fenceB);
 
        if (r)
-               printk(KERN_WARNING "Error while testing ring sync (%d).\n", r);
+               pr_warn("Error while testing ring sync (%d)\n", r);
 }
 
 static bool radeon_test_sync_possible(struct radeon_ring *ringA,
index 34e3235f41d2bf63a5333e33f63e2518f3668942..4121209c183ec111fcae9d226aa1847490d1e570 100644 (file)
@@ -255,8 +255,8 @@ static void rs400_gpu_init(struct radeon_device *rdev)
        /* FIXME: is this correct ? */
        r420_pipes_init(rdev);
        if (rs400_mc_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "rs400: Failed to wait MC idle while "
-                      "programming pipes. Bad things might happen. %08x\n", RREG32(RADEON_MC_STATUS));
+               pr_warn("rs400: Failed to wait MC idle while programming pipes. Bad things might happen. %08x\n",
+                       RREG32(RADEON_MC_STATUS));
        }
 }
 
index 6bc44c24e837b30e39970f0a74e64eab4be88294..1bae33e43f3c0941c1bb5d080f6fb0325af87522 100644 (file)
@@ -52,8 +52,7 @@ static void rs690_gpu_init(struct radeon_device *rdev)
        /* FIXME: is this correct ? */
        r420_pipes_init(rdev);
        if (rs690_mc_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait MC idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait MC idle while programming pipes. Bad things might happen.\n");
        }
 }
 
index c55d653aaf5f6bcfb0b80d24ad1c42025d36e267..ffbd2c006f60f2eb92cc3e80db923be38af3881c 100644 (file)
@@ -154,8 +154,7 @@ static void rv515_gpu_init(struct radeon_device *rdev)
        unsigned pipe_select_current, gb_pipe_select, tmp;
 
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "resetting GPU. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while resetting GPU. Bad things might happen.\n");
        }
        rv515_vga_render_disable(rdev);
        r420_pipes_init(rdev);
@@ -166,12 +165,10 @@ static void rv515_gpu_init(struct radeon_device *rdev)
              (((gb_pipe_select >> 8) & 0xF) << 4);
        WREG32_PLL(0x000D, tmp);
        if (r100_gui_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait GUI idle while "
-                      "resetting GPU. Bad things might happen.\n");
+               pr_warn("Failed to wait GUI idle while resetting GPU. Bad things might happen.\n");
        }
        if (rv515_mc_wait_for_idle(rdev)) {
-               printk(KERN_WARNING "Failed to wait MC idle while "
-                      "programming pipes. Bad things might happen.\n");
+               pr_warn("Failed to wait MC idle while programming pipes. Bad things might happen.\n");
        }
 }
 
index 414776811e71e0a4e9f7c97309b6c173c8f502a3..528e5a49a214202c31c190af813213eb6f609912 100644 (file)
@@ -1762,8 +1762,7 @@ static int si_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->pfp_fw->size != pfp_req_size) {
-                       printk(KERN_ERR
-                              "si_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->pfp_fw->size, fw_name);
                        err = -EINVAL;
                        goto out;
@@ -1771,8 +1770,7 @@ static int si_init_microcode(struct radeon_device *rdev)
        } else {
                err = radeon_ucode_validate(rdev->pfp_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1788,16 +1786,14 @@ static int si_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->me_fw->size != me_req_size) {
-                       printk(KERN_ERR
-                              "si_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->me_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->me_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1813,16 +1809,14 @@ static int si_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->ce_fw->size != ce_req_size) {
-                       printk(KERN_ERR
-                              "si_cp: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_cp: Bogus length %zu in firmware \"%s\"\n",
                               rdev->ce_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->ce_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1838,16 +1832,14 @@ static int si_init_microcode(struct radeon_device *rdev)
                if (err)
                        goto out;
                if (rdev->rlc_fw->size != rlc_req_size) {
-                       printk(KERN_ERR
-                              "si_rlc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_rlc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->rlc_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->rlc_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1871,8 +1863,7 @@ static int si_init_microcode(struct radeon_device *rdev)
                }
                if ((rdev->mc_fw->size != mc_req_size) &&
                    (rdev->mc_fw->size != mc2_req_size)) {
-                       printk(KERN_ERR
-                              "si_mc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_mc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->mc_fw->size, fw_name);
                        err = -EINVAL;
                }
@@ -1880,8 +1871,7 @@ static int si_init_microcode(struct radeon_device *rdev)
        } else {
                err = radeon_ucode_validate(rdev->mc_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1900,23 +1890,19 @@ static int si_init_microcode(struct radeon_device *rdev)
                snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
                err = request_firmware(&rdev->smc_fw, fw_name, rdev->dev);
                if (err) {
-                       printk(KERN_ERR
-                              "smc: error loading firmware \"%s\"\n",
-                              fw_name);
+                       pr_err("smc: error loading firmware \"%s\"\n", fw_name);
                        release_firmware(rdev->smc_fw);
                        rdev->smc_fw = NULL;
                        err = 0;
                } else if (rdev->smc_fw->size != smc_req_size) {
-                       printk(KERN_ERR
-                              "si_smc: Bogus length %zu in firmware \"%s\"\n",
+                       pr_err("si_smc: Bogus length %zu in firmware \"%s\"\n",
                               rdev->smc_fw->size, fw_name);
                        err = -EINVAL;
                }
        } else {
                err = radeon_ucode_validate(rdev->smc_fw);
                if (err) {
-                       printk(KERN_ERR
-                              "si_cp: validation failed for firmware \"%s\"\n",
+                       pr_err("si_cp: validation failed for firmware \"%s\"\n",
                               fw_name);
                        goto out;
                } else {
@@ -1927,7 +1913,7 @@ static int si_init_microcode(struct radeon_device *rdev)
        if (new_fw == 0) {
                rdev->new_fw = false;
        } else if (new_fw < 6) {
-               printk(KERN_ERR "si_fw: mixing new and old firmware!\n");
+               pr_err("si_fw: mixing new and old firmware!\n");
                err = -EINVAL;
        } else {
                rdev->new_fw = true;
@@ -1935,8 +1921,7 @@ static int si_init_microcode(struct radeon_device *rdev)
 out:
        if (err) {
                if (err != -EINVAL)
-                       printk(KERN_ERR
-                              "si_cp: Failed to load firmware \"%s\"\n",
+                       pr_err("si_cp: Failed to load firmware \"%s\"\n",
                               fw_name);
                release_firmware(rdev->pfp_fw);
                rdev->pfp_fw = NULL;