drm/exynos: remove unnecessary messages
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): CGME20190415234343epcas1p25e81389543b0f6bf340519e937044e5a@epcas1p2.samsung.com
Inki Dae
maintainerv3 cover drm/exynos: clean up logs
Just clean up logs of Exynos DRM driver.
What this patch series does is to replace the use of existing DRM_DEBUG/ERROR macros with DRM_DEV_DEBUG*/ERROR* macros including relevant code cleanup.
Chnagelog v3:
. correct subject prefix.
. drop one patch merged already from v2.
Changelog v2:
. Clean up debug/error messages of all Exynos DRM KMS and DMA drivers. . Clean up vidi driver by adding device pointer to vidi_context. . Clean up ipp driver by using device pointer instead of drm_device one,
which makes ipp driver to print out the debug messages with correct device name.
Inki Dae (6):
drm/exynos: fimd: use DRM_ERROR instead of DRM_INFO in error case drm/exynos: remove unnecessary messages
drm/exynos: use DRM_DEV_ERROR to print out error message drm/exynos: use DRM_DEV_DEBUG* instead of DRM_DEBUG macro drm/exynos: vidi: replace platform_device pointer with device one drm/exynos: ipp: clean up debug messages
drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 6 +- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 26 +++---- drivers/gpu/drm/exynos/exynos_dp.c | 9 ++- drivers/gpu/drm/exynos/exynos_drm_dma.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 9 ++- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 7 +- drivers/gpu/drm/exynos/exynos_drm_fb.c | 9 ++- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 26 ++++--- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 97 ++++++++++++++------------- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 48 +++++++------ drivers/gpu/drm/exynos/exynos_drm_g2d.c | 49 ++++++++------ drivers/gpu/drm/exynos/exynos_drm_gem.c | 35 +++++----- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 72 ++++++++++---------- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 71 ++++++++++++-------- drivers/gpu/drm/exynos/exynos_drm_ipp.h | 9 +-- drivers/gpu/drm/exynos/exynos_drm_mic.c | 29 ++++---- drivers/gpu/drm/exynos/exynos_drm_plane.c | 15 +++-- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 5 +- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 5 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 49 ++++++++------ drivers/gpu/drm/exynos/exynos_hdmi.c | 75 ++++++++++++--------- drivers/gpu/drm/exynos/exynos_mixer.c | 43 +++++++----- 22 files changed, 399 insertions(+), 297 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 1/6 drm/exynos: fimd: use DRM_ERROR instead of DRM_INFO in error case
This patch makes error messages to be printed out using DRM_ERROR instead of DRM_INFO.
--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +3 -3
@@ -400,7 +400,7 @@ static int fimd_atomic_check(struct exynos_drm_crtc *crtc,u32 clkdiv;if (mode->clock ==0 ) { -DRM_INFO ("Mode has zero clock value.\n" ); +DRM_ERROR ("Mode has zero clock value.\n" );return -EINVAL ; }
@@ -416,7 +416,7 @@ static int fimd_atomic_check(struct exynos_drm_crtc *crtc, lcd_rate =clk_get_rate (ctx->lcd_clk);if (2 * lcd_rate < ideal_clk) { -DRM_INFO ("sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n" , +DRM_ERROR ("sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n" , lcd_rate, ideal_clk);return -EINVAL ; }
@@ -424,7 +424,7 @@ static int fimd_atomic_check(struct exynos_drm_crtc *crtc,/* Find the clock divider value that gets us closest to ideal_clk */ clkdiv =DIV_ROUND_CLOSEST (lcd_rate, ideal_clk);if (clkdiv >=0x200 ) { -DRM_INFO ("requested pixel clock(%lu) too low\n" , ideal_clk); +DRM_ERROR ("requested pixel clock(%lu) too low\n" , ideal_clk);return -EINVAL ; }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 2/6 drm/exynos: remove unnecessary messages
In reply to Inki DaeThis patch removes unnecessary messages from fimd_clear_channels and decon_clear_channels functions which print out just function name.
--- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 -- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 2 -- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 -- 3 files changed, 6 deletions(-)
drivers/gpu/drm/exynos/exynos5433_drm_decon.c +0 -2
@@ -561,8 +561,6 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc)struct decon_context *ctx = crtc->ctx;int win, i, ret; -DRM_DEBUG_KMS ("%s\n" , __FILE__); -for (i =0 ; i <ARRAY_SIZE (decon_clks_name); i++) { ret =clk_prepare_enable (ctx->clks[i]);if (ret <0 )
drivers/gpu/drm/exynos/exynos7_drm_decon.c +0 -2
@@ -107,8 +107,6 @@ static void decon_clear_channels(struct exynos_drm_crtc *crtc)struct decon_context *ctx = crtc->ctx;unsigned int win, ch_enabled =0 ; -DRM_DEBUG_KMS ("%s\n" , __FILE__); -/* Check if any channel is enabled. */ for (win =0 ; win <WINDOWS_NR ; win++) {u32 val =readl (ctx->regs +WINCON (win));
drivers/gpu/drm/exynos/exynos_drm_fimd.c +0 -2
@@ -350,8 +350,6 @@ static void fimd_clear_channels(struct exynos_drm_crtc *crtc)struct fimd_context *ctx = crtc->ctx;unsigned int win, ch_enabled =0 ; -DRM_DEBUG_KMS ("%s\n" , __FILE__); -/* Hardware is in unknown state, so ensure it gets enabled properly */ pm_runtime_get_sync (ctx->dev);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 3/6 drm/exynos: use DRM_DEV_ERROR to print out error message
In reply to Inki DaeThis patch just cleans up the use of error log macro, which changes the log macro to DRM_DEV_ERROR.
--- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 14 +++++--- drivers/gpu/drm/exynos/exynos_dp.c | 9 +++-- drivers/gpu/drm/exynos/exynos_drm_dma.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 9 +++-- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 7 ++-- drivers/gpu/drm/exynos/exynos_drm_fb.c | 9 +++-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 19 +++++++---- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 7 ++-- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 27 ++++++++++----- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 49 +++++++++++++++------------ drivers/gpu/drm/exynos/exynos_drm_gem.c | 17 +++++----- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 19 ++++++----- drivers/gpu/drm/exynos/exynos_drm_mic.c | 25 ++++++++------ drivers/gpu/drm/exynos/exynos_drm_plane.c | 5 +-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 11 +++--- drivers/gpu/drm/exynos/exynos_hdmi.c | 42 +++++++++++++---------- drivers/gpu/drm/exynos/exynos_mixer.c | 26 +++++++++----- 18 files changed, 179 insertions(+), 120 deletions(-)
drivers/gpu/drm/exynos/exynos5433_drm_decon.c +1 -1
@@ -188,7 +188,7 @@ static void decon_setup_trigger(struct decon_context *ctx)if (regmap_update_bits (ctx->sysreg,DSD_CFG_MUX ,DSD_CFG_MUX_TE_UNMASK_GLOBAL , ~0 )) -DRM_ERROR ("Cannot update sysreg.\n" ); +DRM_DEV_ERROR (ctx->dev,"Cannot update sysreg.\n" ); }static void decon_commit (struct exynos_drm_crtc *crtc)
drivers/gpu/drm/exynos/exynos7_drm_decon.c +9 -5
@@ -620,7 +620,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) ret =decon_ctx_initialize (ctx, drm_dev);if (ret) { -DRM_ERROR ("decon_ctx_initialize failed.\n" ); +DRM_DEV_ERROR (dev,"decon_ctx_initialize failed.\n" );return ret; }
@@ -800,25 +800,29 @@ static int exynos7_decon_resume(struct device *dev) ret =clk_prepare_enable (ctx->pclk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the pclk [%d]\n" , ret); +DRM_DEV_ERROR (dev,"Failed to prepare_enable the pclk [%d]\n" , + ret);return ret; } ret =clk_prepare_enable (ctx->aclk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the aclk [%d]\n" , ret); +DRM_DEV_ERROR (dev,"Failed to prepare_enable the aclk [%d]\n" , + ret);return ret; } ret =clk_prepare_enable (ctx->eclk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the eclk [%d]\n" , ret); +DRM_DEV_ERROR (dev,"Failed to prepare_enable the eclk [%d]\n" , + ret);return ret; } ret =clk_prepare_enable (ctx->vclk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the vclk [%d]\n" , ret); +DRM_DEV_ERROR (dev,"Failed to prepare_enable the vclk [%d]\n" , + ret);return ret; }
drivers/gpu/drm/exynos/exynos_dp.c +6 -3
@@ -83,7 +83,8 @@ static int exynos_dp_get_modes(struct analogix_dp_plat_data *plat_data, mode =drm_mode_create (connector->dev);if (!mode) { -DRM_ERROR ("failed to create a new display mode.\n" ); +DRM_DEV_ERROR (dp->dev, +"failed to create a new display mode.\n" );return num_modes; }
@@ -111,7 +112,8 @@ static int exynos_dp_bridge_attach(struct analogix_dp_plat_data *plat_data,if (dp->ptn_bridge) { ret =drm_bridge_attach (&dp->encoder, dp->ptn_bridge, bridge);if (ret) { -DRM_ERROR ("Failed to attach bridge to drm\n" ); +DRM_DEV_ERROR (dp->dev, +"Failed to attach bridge to drm\n" ); bridge->next =NULL ;return ret; }
@@ -147,7 +149,8 @@ static int exynos_dp_dt_parse_panel(struct exynos_dp_device *dp) ret =of_get_videomode (dp->dev->of_node, &dp->vm,OF_USE_NATIVE_MODE );if (ret) { -DRM_ERROR ("failed: of_get_videomode() : %d\n" , ret); +DRM_DEV_ERROR (dp->dev, +"failed: of_get_videomode() : %d\n" , ret);return ret; }return 0 ;
drivers/gpu/drm/exynos/exynos_drm_dma.c +1 -1
@@ -62,7 +62,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev,int ret;if (get_dma_ops (priv->dma_dev) !=get_dma_ops (subdrv_dev)) { -DRM_ERROR ("Device %s lacks support for IOMMU\n" , +DRM_DEV_ERROR (subdrv_dev,"Device %s lacks support for IOMMU\n" ,dev_name (subdrv_dev));return -EINVAL ; }
drivers/gpu/drm/exynos/exynos_drm_dpi.c +6 -3
@@ -77,7 +77,8 @@ static int exynos_dpi_get_modes(struct drm_connector *connector) mode =drm_mode_create (connector->dev);if (!mode) { -DRM_ERROR ("failed to create a new display mode\n" ); +DRM_DEV_ERROR (ctx->dev, +"failed to create a new display mode\n" );return 0 ; }drm_display_mode_from_videomode (ctx->vm, mode);
@@ -108,7 +109,8 @@ static int exynos_dpi_create_connector(struct drm_encoder *encoder) &exynos_dpi_connector_funcs, DRM_MODE_CONNECTOR_VGA);if (ret) { -DRM_ERROR ("failed to initialize connector with drm\n" ); +DRM_DEV_ERROR (ctx->dev, +"failed to initialize connector with drm\n" );return ret; }
@@ -213,7 +215,8 @@ int exynos_dpi_bind(struct drm_device *dev, struct drm_encoder *encoder) ret =exynos_dpi_create_connector (encoder);if (ret) { -DRM_ERROR ("failed to create connector ret = %d\n" , ret); +DRM_DEV_ERROR (encoder_to_dpi (encoder)->dev, +"failed to create connector ret = %d\n" , ret);drm_encoder_cleanup (encoder);return ret; }
drivers/gpu/drm/exynos/exynos_drm_dsi.c +5 -2
@@ -1483,7 +1483,8 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder) ret =drm_connector_init (drm, connector, &exynos_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );if (ret) { -DRM_ERROR ("Failed to initialize connector with drm\n" ); +DRM_DEV_ERROR (dsi->dev, +"Failed to initialize connector with drm\n" );return ret; }
@@ -1527,7 +1528,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,int ret =exynos_dsi_create_connector (encoder);if (ret) { -DRM_ERROR ("failed to create connector ret = %d\n" , ret); +DRM_DEV_ERROR (dsi->dev, +"failed to create connector ret = %d\n" , + ret);drm_encoder_cleanup (encoder);return ret; }
drivers/gpu/drm/exynos/exynos_drm_fb.c +6 -3
@@ -45,7 +45,8 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev,* supported without IOMMU. */ if (IS_NONCONTIG_BUFFER (flags)) { -DRM_ERROR ("Non-contiguous GEM memory is not supported.\n" ); +DRM_DEV_ERROR (drm_dev->dev, +"Non-contiguous GEM memory is not supported.\n" );return -EINVAL ; }
@@ -83,7 +84,8 @@ exynos_drm_framebuffer_init(struct drm_device *dev, ret =drm_framebuffer_init (dev, fb, &exynos_drm_fb_funcs);if (ret <0 ) { -DRM_ERROR ("failed to initialize framebuffer\n" ); +DRM_DEV_ERROR (dev->dev, +"failed to initialize framebuffer\n" ); goto err; }
@@ -113,7 +115,8 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, exynos_gem[i] =exynos_drm_gem_get (file_priv, mode_cmd->handles[i]);if (!exynos_gem[i]) { -DRM_ERROR ("failed to lookup gem object\n" ); +DRM_DEV_ERROR (dev->dev, +"failed to lookup gem object\n" ); ret = -ENOENT ; goto err; }
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +12 -7
@@ -55,7 +55,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info, exynos_gem->dma_addr, exynos_gem->size, exynos_gem->dma_attrs);if (ret <0 ) { -DRM_ERROR ("failed to mmap.\n" ); +DRM_DEV_ERROR (to_dma_dev (helper->dev),"failed to mmap.\n" );return ret; }
@@ -83,7 +83,8 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, fbi =drm_fb_helper_alloc_fbi (helper);if (IS_ERR (fbi)) { -DRM_ERROR ("failed to allocate fb info.\n" ); +DRM_DEV_ERROR (to_dma_dev (helper->dev), +"failed to allocate fb info.\n" );return PTR_ERR (fbi); }
@@ -98,7 +99,8 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, exynos_gem->kvaddr = (void __iomem *)vmap (exynos_gem->pages, nr_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));if (!exynos_gem->kvaddr) { -DRM_ERROR ("failed to map pages to kernel space.\n" ); +DRM_DEV_ERROR (to_dma_dev (helper->dev), +"failed to map pages to kernel space.\n" );return -EIO ; }
@@ -154,7 +156,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, helper->fb =exynos_drm_framebuffer_init (dev, &mode_cmd, &exynos_gem,1 );if (IS_ERR (helper->fb)) { -DRM_ERROR ("failed to create drm framebuffer.\n" ); +DRM_DEV_ERROR (dev->dev,"failed to create drm framebuffer.\n" ); ret =PTR_ERR (helper->fb); goto err_destroy_gem; }
@@ -203,20 +205,23 @@ int exynos_drm_fbdev_init(struct drm_device *dev) ret =drm_fb_helper_init (dev, helper,MAX_CONNECTOR );if (ret <0 ) { -DRM_ERROR ("failed to initialize drm fb helper.\n" ); +DRM_DEV_ERROR (dev->dev, +"failed to initialize drm fb helper.\n" ); goto err_init; } ret =drm_fb_helper_single_add_all_connectors (helper);if (ret <0 ) { -DRM_ERROR ("failed to register drm_fb_helper_connector.\n" ); +DRM_DEV_ERROR (dev->dev, +"failed to register drm_fb_helper_connector.\n" ); goto err_setup; } ret =drm_fb_helper_initial_config (helper,PREFERRED_BPP );if (ret <0 ) { -DRM_ERROR ("failed to set up hw configuration.\n" ); +DRM_DEV_ERROR (dev->dev, +"failed to set up hw configuration.\n" ); goto err_setup; }
drivers/gpu/drm/exynos/exynos_drm_fimc.c +4 -3
@@ -232,8 +232,9 @@ static bool fimc_check_ovf(struct fimc_context *ctx)EXYNOS_CIWDOFST_CLROVFIY |EXYNOS_CIWDOFST_CLROVFICB | EXYNOS_CIWDOFST_CLROVFICR); -dev_err (ctx->dev,"occurred overflow at %d, status 0x%x.\n" , - ctx->id, status); +DRM_DEV_ERROR (ctx->dev, +"occurred overflow at %d, status 0x%x.\n" , + ctx->id, status);return true; }
@@ -273,7 +274,7 @@ static int fimc_get_buf_id(struct fimc_context *ctx) EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg));if (frame_cnt ==0 ) { -DRM_ERROR ("failed to get frame count.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to get frame count.\n" );return -EIO ; }
drivers/gpu/drm/exynos/exynos_drm_fimd.c +18 -9
@@ -398,7 +398,7 @@ static int fimd_atomic_check(struct exynos_drm_crtc *crtc,u32 clkdiv;if (mode->clock ==0 ) { -DRM_ERROR ("Mode has zero clock value.\n" ); +DRM_DEV_ERROR (ctx->dev,"Mode has zero clock value.\n" );return -EINVAL ; }
@@ -414,15 +414,17 @@ static int fimd_atomic_check(struct exynos_drm_crtc *crtc, lcd_rate =clk_get_rate (ctx->lcd_clk);if (2 * lcd_rate < ideal_clk) { -DRM_ERROR ("sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n" , - lcd_rate, ideal_clk); +DRM_DEV_ERROR (ctx->dev, +"sclk_fimd clock too low(%lu) for requested pixel clock(%lu)\n" , + lcd_rate, ideal_clk);return -EINVAL ; }/* Find the clock divider value that gets us closest to ideal_clk */ clkdiv =DIV_ROUND_CLOSEST (lcd_rate, ideal_clk);if (clkdiv >=0x200 ) { -DRM_ERROR ("requested pixel clock(%lu) too low\n" , ideal_clk); +DRM_DEV_ERROR (ctx->dev,"requested pixel clock(%lu) too low\n" , + ideal_clk);return -EINVAL ; }
@@ -479,7 +481,8 @@ static void fimd_commit(struct exynos_drm_crtc *crtc) driver_data->lcdblk_offset, 0x3 << driver_data->lcdblk_vt_shift, 0x1 << driver_data->lcdblk_vt_shift)) { -DRM_ERROR ("Failed to update sysreg for I80 i/f.\n" ); +DRM_DEV_ERROR (ctx->dev, +"Failed to update sysreg for I80 i/f.\n" );return ; } }else {
@@ -523,7 +526,8 @@ static void fimd_commit(struct exynos_drm_crtc *crtc) driver_data->lcdblk_offset, 0x1 << driver_data->lcdblk_bypass_shift, 0x1 << driver_data->lcdblk_bypass_shift)) { -DRM_ERROR ("Failed to update sysreg for bypass setting.\n" ); +DRM_DEV_ERROR (ctx->dev, +"Failed to update sysreg for bypass setting.\n" );return ; }
@@ -535,7 +539,8 @@ static void fimd_commit(struct exynos_drm_crtc *crtc) driver_data->lcdblk_offset, 0x1 << driver_data->lcdblk_mic_bypass_shift, 0x1 << driver_data->lcdblk_mic_bypass_shift)) { -DRM_ERROR ("Failed to update sysreg for bypass mic.\n" ); +DRM_DEV_ERROR (ctx->dev, +"Failed to update sysreg for bypass mic.\n" );return ; }
@@ -1250,13 +1255,17 @@ static int exynos_fimd_resume(struct device *dev) ret =clk_prepare_enable (ctx->bus_clk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the bus clk [%d]\n" , ret); +DRM_DEV_ERROR (dev, +"Failed to prepare_enable the bus clk [%d]\n" , + ret);return ret; } ret =clk_prepare_enable (ctx->lcd_clk);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the lcd clk [%d]\n" , ret); +DRM_DEV_ERROR (dev, +"Failed to prepare_enable the lcd clk [%d]\n" , + ret);return ret; }
drivers/gpu/drm/exynos/exynos_drm_g2d.c +27 -22
157 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_gem.c +9 -8
@@ -61,7 +61,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) exynos_gem->pages =kvmalloc_array (nr_pages,sizeof (struct page *),GFP_KERNEL | __GFP_ZERO);if (!exynos_gem->pages) { -DRM_ERROR ("failed to allocate pages.\n" ); +DRM_DEV_ERROR (to_dma_dev (dev),"failed to allocate pages.\n" );return -ENOMEM ; }
@@ -69,7 +69,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) &exynos_gem->dma_addr,GFP_KERNEL , exynos_gem->dma_attrs);if (!exynos_gem->cookie) { -DRM_ERROR ("failed to allocate buffer.\n" ); +DRM_DEV_ERROR (to_dma_dev (dev),"failed to allocate buffer.\n" ); goto err_free; }
@@ -77,13 +77,13 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) exynos_gem->dma_addr, exynos_gem->size, exynos_gem->dma_attrs);if (ret <0 ) { -DRM_ERROR ("failed to get sgtable.\n" ); +DRM_DEV_ERROR (to_dma_dev (dev),"failed to get sgtable.\n" ); goto err_dma_free; }if (drm_prime_sg_to_page_addr_arrays (&sgt, exynos_gem->pages,NULL , nr_pages)) { -DRM_ERROR ("invalid sgtable.\n" ); +DRM_DEV_ERROR (to_dma_dev (dev),"invalid sgtable.\n" ); ret = -EINVAL ; goto err_sgt_free; }
@@ -186,7 +186,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev, ret =drm_gem_object_init (dev, obj, size);if (ret <0 ) { -DRM_ERROR ("failed to initialize gem object\n" ); +DRM_DEV_ERROR (dev->dev,"failed to initialize gem object\n" );kfree (exynos_gem);return ERR_PTR (ret); }
@@ -211,12 +211,13 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,int ret;if (flags & ~(EXYNOS_BO_MASK )) { -DRM_ERROR ("invalid GEM buffer flags: %u\n" , flags); +DRM_DEV_ERROR (dev->dev, +"invalid GEM buffer flags: %u\n" , flags);return ERR_PTR (-EINVAL ); }if (!size) { -DRM_ERROR ("invalid GEM buffer size: %lu\n" , size); +DRM_DEV_ERROR (dev->dev,"invalid GEM buffer size: %lu\n" , size);return ERR_PTR (-EINVAL ); }
@@ -325,7 +326,7 @@ int exynos_drm_gem_get_ioctl(struct drm_device *dev, void *data, obj =drm_gem_object_lookup (file_priv, args->handle);if (!obj) { -DRM_ERROR ("failed to lookup gem object.\n" ); +DRM_DEV_ERROR (dev->dev,"failed to lookup gem object.\n" );return -EINVAL ; }
drivers/gpu/drm/exynos/exynos_drm_gsc.c +10 -9
@@ -395,7 +395,7 @@ static int gsc_sw_reset(struct gsc_context *ctx) }if (cfg) { -DRM_ERROR ("failed to reset gsc h/w.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to reset gsc h/w.\n" );return -EBUSY ; }
@@ -706,12 +706,13 @@ static void gsc_dst_set_fmt(struct gsc_context *ctx, u32 fmt, bool tiled)gsc_write (cfg,GSC_OUT_CON ); } -static int gsc_get_ratio_shift (u32 src,u32 dst,u32 *ratio) +static int gsc_get_ratio_shift (struct gsc_context *ctx,u32 src,u32 dst, +u32 *ratio) {DRM_DEBUG_KMS ("src[%d]dst[%d]\n" , src, dst);if (src >= dst *8 ) { -DRM_ERROR ("failed to make ratio and shift.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to make ratio and shift.\n" );return -EINVAL ; }else if (src >= dst *4 ) *ratio =4 ;
@@ -759,15 +760,15 @@ static int gsc_set_prescaler(struct gsc_context *ctx, struct gsc_scaler *sc, dst_h = dst->h; } - ret =gsc_get_ratio_shift (src_w, dst_w, &sc->pre_hratio); + ret =gsc_get_ratio_shift (ctx, src_w, dst_w, &sc->pre_hratio);if (ret) { -dev_err (ctx->dev,"failed to get ratio horizontal.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to get ratio horizontal.\n" );return ret; } - ret =gsc_get_ratio_shift (src_h, dst_h, &sc->pre_vratio); + ret =gsc_get_ratio_shift (ctx, src_h, dst_h, &sc->pre_vratio);if (ret) { -dev_err (ctx->dev,"failed to get ratio vertical.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to get ratio vertical.\n" );return ret; }
@@ -979,7 +980,7 @@ static int gsc_get_src_buf_index(struct gsc_context *ctx) curr_index, buf_id);if (buf_id ==GSC_MAX_SRC ) { -DRM_ERROR ("failed to get in buffer index.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to get in buffer index.\n" );return -EINVAL ; }
@@ -1006,7 +1007,7 @@ static int gsc_get_dst_buf_index(struct gsc_context *ctx) }if (buf_id ==GSC_MAX_DST ) { -DRM_ERROR ("failed to get out buffer index.\n" ); +DRM_DEV_ERROR (ctx->dev,"failed to get out buffer index.\n" );return -EINVAL ; }
drivers/gpu/drm/exynos/exynos_drm_mic.c +14 -11
@@ -113,7 +113,8 @@ static void mic_set_path(struct exynos_mic *mic, bool enable) ret =regmap_read (mic->sysreg,DSD_CFG_MUX , &val);if (ret) { -DRM_ERROR ("mic: Failed to read system register\n" ); +DRM_DEV_ERROR (mic->dev, +"mic: Failed to read system register\n" );return ; }
@@ -129,7 +130,8 @@ static void mic_set_path(struct exynos_mic *mic, bool enable) ret =regmap_write (mic->sysreg,DSD_CFG_MUX , val);if (ret) -DRM_ERROR ("mic: Failed to read system register\n" ); +DRM_DEV_ERROR (mic->dev, +"mic: Failed to read system register\n" ); }static int mic_sw_reset (struct exynos_mic *mic)
@@ -274,7 +276,7 @@ static void mic_pre_enable(struct drm_bridge *bridge) ret =mic_sw_reset (mic);if (ret) { -DRM_ERROR ("Failed to reset\n" ); +DRM_DEV_ERROR (mic->dev,"Failed to reset\n" ); goto turn_off; }
@@ -354,8 +356,8 @@ static int exynos_mic_resume(struct device *dev)for (i =0 ; i <NUM_CLKS ; i++) { ret =clk_prepare_enable (mic->clks[i]);if (ret <0 ) { -DRM_ERROR ("Failed to enable clock (%s)\n" , - clk_names[i]); +DRM_DEV_ERROR (dev,"Failed to enable clock (%s)\n" , + clk_names[i]);while (--i >-1 )clk_disable_unprepare (mic->clks[i]);return ret;
@@ -380,7 +382,8 @@ static int exynos_mic_probe(struct platform_device *pdev) mic =devm_kzalloc (dev,sizeof (*mic),GFP_KERNEL );if (!mic) { -DRM_ERROR ("mic: Failed to allocate memory for MIC object\n" ); +DRM_DEV_ERROR (dev, +"mic: Failed to allocate memory for MIC object\n" ); ret = -ENOMEM ; goto err; }
@@ -389,12 +392,12 @@ static int exynos_mic_probe(struct platform_device *pdev) ret =of_address_to_resource (dev->of_node,0 , &res);if (ret) { -DRM_ERROR ("mic: Failed to get mem region for MIC\n" ); +DRM_DEV_ERROR (dev,"mic: Failed to get mem region for MIC\n" ); goto err; } mic->reg =devm_ioremap (dev, res.start,resource_size (&res));if (!mic->reg) { -DRM_ERROR ("mic: Failed to remap for MIC\n" ); +DRM_DEV_ERROR (dev,"mic: Failed to remap for MIC\n" ); ret = -ENOMEM ; goto err; }
@@ -402,7 +405,7 @@ static int exynos_mic_probe(struct platform_device *pdev) mic->sysreg =syscon_regmap_lookup_by_phandle (dev->of_node,"samsung,disp-syscon" );if (IS_ERR (mic->sysreg)) { -DRM_ERROR ("mic: Failed to get system register.\n" ); +DRM_DEV_ERROR (dev,"mic: Failed to get system register.\n" ); ret =PTR_ERR (mic->sysreg); goto err; }
@@ -410,8 +413,8 @@ static int exynos_mic_probe(struct platform_device *pdev)for (i =0 ; i <NUM_CLKS ; i++) { mic->clks[i] =devm_clk_get (dev, clk_names[i]);if (IS_ERR (mic->clks[i])) { -DRM_ERROR ("mic: Failed to get clock (%s)\n" , - clk_names[i]); +DRM_DEV_ERROR (dev,"mic: Failed to get clock (%s)\n" , + clk_names[i]); ret =PTR_ERR (mic->clks[i]); goto err; }
drivers/gpu/drm/exynos/exynos_drm_plane.c +3 -2
@@ -181,6 +181,7 @@ exynos_drm_plane_check_format(const struct exynos_drm_plane_config *config, struct exynos_drm_plane_state *state) {struct drm_framebuffer *fb = state->base.fb; +struct drm_device *dev = fb->dev;switch (fb->modifier) {case DRM_FORMAT_MOD_SAMSUNG_64_32_TILE :
@@ -192,7 +193,7 @@ exynos_drm_plane_check_format(const struct exynos_drm_plane_config *config,break ;default : -DRM_ERROR ("unsupported pixel format modifier" ); +DRM_DEV_ERROR (dev->dev,"unsupported pixel format modifier" );return -ENOTSUPP ; }
@@ -310,7 +311,7 @@ int exynos_plane_init(struct drm_device *dev, config->num_pixel_formats, NULL, config->type, NULL);if (err) { -DRM_ERROR ("failed to initialize plane\n" ); +DRM_DEV_ERROR (dev->dev,"failed to initialize plane\n" );return err; }
drivers/gpu/drm/exynos/exynos_drm_vidi.c +7 -4
@@ -339,7 +339,8 @@ static int vidi_create_connector(struct drm_encoder *encoder) ret =drm_connector_init (ctx->drm_dev, connector, &vidi_connector_funcs,DRM_MODE_CONNECTOR_VIRTUAL );if (ret) { -DRM_ERROR ("Failed to initialize connector with drm\n" ); +DRM_DEV_ERROR (ctx->drm_dev->dev, +"Failed to initialize connector with drm\n" );return ret; }
@@ -402,7 +403,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) ctx->crtc =exynos_drm_crtc_create (drm_dev, &exynos_plane->base,EXYNOS_DISPLAY_TYPE_VIDI , &vidi_crtc_ops, ctx);if (IS_ERR (ctx->crtc)) { -DRM_ERROR ("failed to create crtc.\n" ); +DRM_DEV_ERROR (dev,"failed to create crtc.\n" );return PTR_ERR (ctx->crtc); }
@@ -417,7 +418,8 @@ static int vidi_bind(struct device *dev, struct device *master, void *data) ret =vidi_create_connector (encoder);if (ret) { -DRM_ERROR ("failed to create connector ret = %d\n" , ret); +DRM_DEV_ERROR (dev,"failed to create connector ret = %d\n" , + ret);drm_encoder_cleanup (encoder);return ret; }
@@ -457,7 +459,8 @@ static int vidi_probe(struct platform_device *pdev) ret =device_create_file (&pdev->dev, &dev_attr_connection);if (ret <0 ) { -DRM_ERROR ("failed to create connection sysfs.\n" ); +DRM_DEV_ERROR (&pdev->dev, +"failed to create connection sysfs.\n" );return ret; }
drivers/gpu/drm/exynos/exynos_hdmi.c +24 -18
149 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_mixer.c +17 -9
@@ -885,7 +885,8 @@ static int mixer_initialize(struct mixer_context *mixer_ctx,/* acquire resources: regs, irqs, clocks */ ret =mixer_resources_init (mixer_ctx);if (ret) { -DRM_ERROR ("mixer_resources_init failed ret=%d\n" , ret); +DRM_DEV_ERROR (mixer_ctx->dev, +"mixer_resources_init failed ret=%d\n" , ret);return ret; }
@@ -893,7 +894,8 @@ static int mixer_initialize(struct mixer_context *mixer_ctx,/* acquire vp resources: regs, irqs, clocks */ ret =vp_resources_init (mixer_ctx);if (ret) { -DRM_ERROR ("vp_resources_init failed ret=%d\n" , ret); +DRM_DEV_ERROR (mixer_ctx->dev, +"vp_resources_init failed ret=%d\n" , ret);return ret; } }
@@ -1227,7 +1229,7 @@ static int mixer_probe(struct platform_device *pdev) ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL );if (!ctx) { -DRM_ERROR ("failed to alloc mixer context.\n" ); +DRM_DEV_ERROR (dev,"failed to alloc mixer context.\n" );return -ENOMEM ; }
@@ -1282,27 +1284,33 @@ static int __maybe_unused exynos_mixer_resume(struct device *dev) ret =clk_prepare_enable (ctx->mixer);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the mixer clk [%d]\n" , ret); +DRM_DEV_ERROR (ctx->dev, +"Failed to prepare_enable the mixer clk [%d]\n" , + ret);return ret; } ret =clk_prepare_enable (ctx->hdmi);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the hdmi clk [%d]\n" , ret); +DRM_DEV_ERROR (dev, +"Failed to prepare_enable the hdmi clk [%d]\n" , + ret);return ret; }if (test_bit (MXR_BIT_VP_ENABLED , &ctx->flags)) { ret =clk_prepare_enable (ctx->vp);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the vp clk [%d]\n" , - ret); +DRM_DEV_ERROR (dev, +"Failed to prepare_enable the vp clk [%d]\n" , + ret);return ret; }if (test_bit (MXR_BIT_HAS_SCLK , &ctx->flags)) { ret =clk_prepare_enable (ctx->sclk_mixer);if (ret <0 ) { -DRM_ERROR ("Failed to prepare_enable the " \ +DRM_DEV_ERROR (dev, +"Failed to prepare_enable the " \"sclk_mixer clk [%d]\n" , - ret); + ret);return ret; } }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 4/6 drm/exynos: use DRM_DEV_DEBUG* instead of DRM_DEBUG macro
In reply to Inki DaeUse DRM_DEV_DEBUG* instead of DRM_DEBUG macro to print out debug messages.
This patch just cleans up the use of debug log macro, which changes the log macro to DRM_DEV_DEBUG*.
--- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 10 ++-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 7 ++- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 85 ++++++++++++++------------- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 18 +++--- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 48 +++++++-------- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 61 ++++++++++++------- drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_plane.c | 10 ++-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 25 ++++---- drivers/gpu/drm/exynos/exynos_hdmi.c | 33 +++++++---- drivers/gpu/drm/exynos/exynos_mixer.c | 17 +++--- 13 files changed, 191 insertions(+), 148 deletions(-)
drivers/gpu/drm/exynos/exynos5433_drm_decon.c +1 -1
@@ -356,7 +356,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,break ; } -DRM_DEBUG_KMS ("cpp = %u\n" , fb->format->cpp[0 ]); +DRM_DEV_DEBUG_KMS (ctx->dev,"cpp = %u\n" , fb->format->cpp[0 ]);/* * In case of exynos, setting dma-burst to 16Word causes permanent
drivers/gpu/drm/exynos/exynos7_drm_decon.c +5 -5
@@ -99,7 +99,7 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc)if (!wait_event_timeout (ctx->wait_vsync_queue, !atomic_read (&ctx->wait_vsync_event),HZ /20 )) -DRM_DEBUG_KMS ("vblank wait timed out.\n" ); +DRM_DEV_DEBUG_KMS (ctx->dev,"vblank wait timed out.\n" ); }static void decon_clear_channels (struct exynos_drm_crtc *crtc)
@@ -313,7 +313,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,break ; } -DRM_DEBUG_KMS ("cpp = %d\n" , fb->format->cpp[0 ]); +DRM_DEV_DEBUG_KMS (ctx->dev,"cpp = %d\n" , fb->format->cpp[0 ]);/* * In case of exynos, setting dma-burst to 16Word causes permanent
@@ -420,9 +420,9 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,writel (state->src.x, ctx->regs +VIDW_OFFSET_X (win));writel (state->src.y, ctx->regs +VIDW_OFFSET_Y (win)); -DRM_DEBUG_KMS ("start addr = 0x%lx\n" , +DRM_DEV_DEBUG_KMS (ctx->dev,"start addr = 0x%lx\n" , (unsigned long )val); -DRM_DEBUG_KMS ("ovl_width = %d, ovl_height = %d\n" , +DRM_DEV_DEBUG_KMS (ctx->dev,"ovl_width = %d, ovl_height = %d\n" , state->crtc.w, state->crtc.h); val = VIDOSDxA_TOPLEFT_X(state->crtc.x) |
@@ -440,7 +440,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,writel (val, ctx->regs +VIDOSD_B (win)); -DRM_DEBUG_KMS ("osd pos: tx = %d, ty = %d, bx = %d, by = %d\n" , +DRM_DEV_DEBUG_KMS (ctx->dev,"osd pos: tx = %d, ty = %d, bx = %d, by = %d\n" , state->crtc.x, state->crtc.y, last_x, last_y);/* OSD alpha */
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +4 -3
@@ -124,9 +124,10 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,unsigned long size;int ret; -DRM_DEBUG_KMS ("surface width(%d), height(%d) and bpp(%d\n" , - sizes->surface_width, sizes->surface_height, - sizes->surface_bpp); +DRM_DEV_DEBUG_KMS (dev->dev, +"surface width(%d), height(%d) and bpp(%d\n" , + sizes->surface_width, sizes->surface_height, + sizes->surface_bpp); mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height;
drivers/gpu/drm/exynos/exynos_drm_fimc.c +45 -40
242 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_fimd.c +11 -8
@@ -315,7 +315,7 @@ static void fimd_wait_for_vblank(struct exynos_drm_crtc *crtc)if (!wait_event_timeout (ctx->wait_vsync_queue, !atomic_read (&ctx->wait_vsync_event),HZ /20 )) -DRM_DEBUG_KMS ("vblank wait timed out.\n" ); +DRM_DEV_DEBUG_KMS (ctx->dev,"vblank wait timed out.\n" ); } static void fimd_enable_video_output(struct fimd_context *ctx, unsigned int win,
@@ -817,10 +817,11 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc, val = (unsigned long )(dma_addr + size);writel (val, ctx->regs +VIDWx_BUF_END (win,0 )); -DRM_DEBUG_KMS ("start addr = 0x%lx, end addr = 0x%lx, size = 0x%lx\n" , - (unsigned long )dma_addr, val, size); -DRM_DEBUG_KMS ("ovl_width = %d, ovl_height = %d\n" , - state->crtc.w, state->crtc.h); +DRM_DEV_DEBUG_KMS (ctx->dev, +"start addr = 0x%lx, end addr = 0x%lx, size = 0x%lx\n" , + (unsigned long )dma_addr, val, size); +DRM_DEV_DEBUG_KMS (ctx->dev,"ovl_width = %d, ovl_height = %d\n" , + state->crtc.w, state->crtc.h);/* buffer size */ buf_offsize = pitch - (state->crtc.w * cpp);
@@ -850,8 +851,9 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,writel (val, ctx->regs +VIDOSD_B (win)); -DRM_DEBUG_KMS ("osd pos: tx = %d, ty = %d, bx = %d, by = %d\n" , - state->crtc.x, state->crtc.y, last_x, last_y); +DRM_DEV_DEBUG_KMS (ctx->dev, +"osd pos: tx = %d, ty = %d, bx = %d, by = %d\n" , + state->crtc.x, state->crtc.y, last_x, last_y);/* OSD size */ if (win !=3 && win !=4 ) {
@@ -861,7 +863,8 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc, val = state->crtc.w * state->crtc.h;writel (val, ctx->regs + offset); -DRM_DEBUG_KMS ("osd size = 0x%x\n" , (unsigned int )val); +DRM_DEV_DEBUG_KMS (ctx->dev,"osd size = 0x%x\n" , + (unsigned int )val); }fimd_win_set_pixfmt (ctx, win, fb, state->src.w);
drivers/gpu/drm/exynos/exynos_drm_gem.c +10 -8
@@ -29,7 +29,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem)int ret = -ENOMEM ;if (exynos_gem->dma_addr) { -DRM_DEBUG_KMS ("already allocated.\n" ); +DRM_DEV_DEBUG_KMS (to_dma_dev (dev),"already allocated.\n" );return 0 ; }
@@ -90,7 +90,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem)sg_free_table (&sgt); -DRM_DEBUG_KMS ("dma_addr(0x%lx), size(0x%lx)\n" , +DRM_DEV_DEBUG_KMS (to_dma_dev (dev),"dma_addr(0x%lx), size(0x%lx)\n" , (unsigned long )exynos_gem->dma_addr, exynos_gem->size);return 0 ;
@@ -111,11 +111,11 @@ static void exynos_drm_free_buf(struct exynos_drm_gem *exynos_gem)struct drm_device *dev = exynos_gem->base.dev;if (!exynos_gem->dma_addr) { -DRM_DEBUG_KMS ("dma_addr is invalid.\n" ); +DRM_DEV_DEBUG_KMS (dev->dev,"dma_addr is invalid.\n" );return ; } -DRM_DEBUG_KMS ("dma_addr(0x%lx), size(0x%lx)\n" , +DRM_DEV_DEBUG_KMS (dev->dev,"dma_addr(0x%lx), size(0x%lx)\n" , (unsigned long )exynos_gem->dma_addr, exynos_gem->size); dma_free_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem->cookie,
@@ -139,7 +139,7 @@ static int exynos_drm_gem_handle_create(struct drm_gem_object *obj,if (ret)return ret; -DRM_DEBUG_KMS ("gem handle = 0x%x\n" , *handle); +DRM_DEV_DEBUG_KMS (to_dma_dev (obj->dev),"gem handle = 0x%x\n" , *handle);/* drop reference from allocate - handle holds it now. */ drm_gem_object_put_unlocked (obj);
@@ -151,7 +151,8 @@ void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem) {struct drm_gem_object *obj = &exynos_gem->base; -DRM_DEBUG_KMS ("handle count = %d\n" , obj->handle_count); +DRM_DEV_DEBUG_KMS (to_dma_dev (obj->dev),"handle count = %d\n" , + obj->handle_count);/* * do not release memory region from exporter.
@@ -198,7 +199,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev,return ERR_PTR (ret); } -DRM_DEBUG_KMS ("created file object = %pK\n" , obj->filp); +DRM_DEV_DEBUG_KMS (dev->dev,"created file object = %pK\n" , obj->filp);return exynos_gem; }
@@ -409,7 +410,8 @@ static int exynos_drm_gem_mmap_obj(struct drm_gem_object *obj,struct exynos_drm_gem *exynos_gem =to_exynos_gem (obj);int ret; -DRM_DEBUG_KMS ("flags = 0x%x\n" , exynos_gem->flags); +DRM_DEV_DEBUG_KMS (to_dma_dev (obj->dev),"flags = 0x%x\n" , + exynos_gem->flags);/* non-cachable as default. */ if (exynos_gem->flags &EXYNOS_BO_CACHABLE )
drivers/gpu/drm/exynos/exynos_drm_gsc.c +24 -24
146 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_ipp.c +39 -22
160 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_mic.c +2 -2
@@ -192,7 +192,7 @@ static void mic_set_output_timing(struct exynos_mic *mic)struct videomode vm = mic->vm;u32 reg, bs_size_2d; -DRM_DEBUG ("w: %u, h: %u\n" , vm.hactive, vm.vactive); +DRM_DEV_DEBUG (mic->dev,"w: %u, h: %u\n" , vm.hactive, vm.vactive); bs_size_2d = ((vm.hactive >>2 ) <<1 ) + (vm.vactive %4 ); reg =MIC_BS_SIZE_2D (bs_size_2d);writel (reg, mic->reg +MIC_2D_OUTPUT_TIMING_2 );
@@ -433,7 +433,7 @@ static int exynos_mic_probe(struct platform_device *pdev)if (ret) goto err_pm; -DRM_DEBUG_KMS ("MIC has been probed\n" ); +DRM_DEV_DEBUG_KMS (dev,"MIC has been probed\n" );return 0 ;
drivers/gpu/drm/exynos/exynos_drm_plane.c +6 -4
@@ -119,9 +119,10 @@ static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state) exynos_state->crtc.w = actual_w; exynos_state->crtc.h = actual_h; -DRM_DEBUG_KMS ("plane : offset_x/y(%d,%d), width/height(%d,%d)" , - exynos_state->crtc.x, exynos_state->crtc.y, - exynos_state->crtc.w, exynos_state->crtc.h); +DRM_DEV_DEBUG_KMS (crtc->dev->dev, +"plane : offset_x/y(%d,%d), width/height(%d,%d)" , + exynos_state->crtc.x, exynos_state->crtc.y, + exynos_state->crtc.w, exynos_state->crtc.h); }static void exynos_drm_plane_reset (struct drm_plane *plane)
@@ -204,6 +205,7 @@ static int exynos_drm_plane_check_size(const struct exynos_drm_plane_config *config, struct exynos_drm_plane_state *state) { + struct drm_crtc *crtc = state->base.crtc;bool width_ok = false, height_ok = false;if (config->capabilities &EXYNOS_DRM_PLANE_CAP_SCALE )
@@ -226,7 +228,7 @@ exynos_drm_plane_check_size(const struct exynos_drm_plane_config *config,if (width_ok && height_ok)return 0 ; -DRM_DEBUG_KMS ("scaling mode is not supported" ); +DRM_DEV_DEBUG_KMS (crtc->dev->dev,"scaling mode is not supported" );return -ENOTSUPP ; }
drivers/gpu/drm/exynos/exynos_drm_vidi.c +15 -10
@@ -123,7 +123,7 @@ static void vidi_update_plane(struct exynos_drm_crtc *crtc,return ; addr =exynos_drm_fb_dma_addr (state->fb,0 ); -DRM_DEBUG_KMS ("dma_addr = %pad\n" , &addr); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"dma_addr = %pad\n" , &addr); }static void vidi_enable (struct exynos_drm_crtc *crtc)
@@ -205,11 +205,11 @@ static ssize_t vidi_store_connection(struct device *dev,/* if raw_edid isn't same as fake data then it can't be tested. */ if (ctx->raw_edid != (struct edid *)fake_edid_info) { -DRM_DEBUG_KMS ("edid data is not fake data.\n" ); +DRM_DEV_DEBUG_KMS (dev,"edid data is not fake data.\n" );return -EINVAL ; } -DRM_DEBUG_KMS ("requested connection.\n" ); +DRM_DEV_DEBUG_KMS (dev,"requested connection.\n" );drm_helper_hpd_irq_event (ctx->drm_dev);
@@ -226,17 +226,20 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,struct drm_exynos_vidi_connection *vidi = data;if (!vidi) { -DRM_DEBUG_KMS ("user data for vidi is null.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +"user data for vidi is null.\n" );return -EINVAL ; }if (vidi->connection >1 ) { -DRM_DEBUG_KMS ("connection should be 0 or 1.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +"connection should be 0 or 1.\n" );return -EINVAL ; }if (ctx->connected == vidi->connection) { -DRM_DEBUG_KMS ("same connection request.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +"same connection request.\n" );return -EINVAL ; }
@@ -245,12 +248,14 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, raw_edid = (struct edid *)(unsigned long )vidi->edid;if (!drm_edid_is_valid (raw_edid)) { -DRM_DEBUG_KMS ("edid data is invalid.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +"edid data is invalid.\n" );return -EINVAL ; } ctx->raw_edid =drm_edid_duplicate (raw_edid);if (!ctx->raw_edid) { -DRM_DEBUG_KMS ("failed to allocate raw_edid.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +"failed to allocate raw_edid.\n" );return -ENOMEM ; } }else {
@@ -308,14 +313,14 @@ static int vidi_get_modes(struct drm_connector *connector)* to ctx->raw_edid through specific ioctl. */ if (!ctx->raw_edid) { -DRM_DEBUG_KMS ("raw_edid is null.\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"raw_edid is null.\n" );return -EFAULT ; } edid_len = (1 + ctx->raw_edid->extensions) *EDID_LENGTH ; edid =kmemdup (ctx->raw_edid, edid_len,GFP_KERNEL );if (!edid) { -DRM_DEBUG_KMS ("failed to allocate edid\n" ); +DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"failed to allocate edid\n" );return -ENOMEM ; }
drivers/gpu/drm/exynos/exynos_hdmi.c +20 -13
@@ -885,9 +885,9 @@ static int hdmi_get_modes(struct drm_connector *connector)return -ENODEV ; hdata->dvi_mode = !drm_detect_hdmi_monitor (edid); -DRM_DEBUG_KMS ("%s : width[%d] x height[%d]\n" , - (hdata->dvi_mode ?"dvi monitor" :"hdmi monitor" ), - edid->width_cm, edid->height_cm); +DRM_DEV_DEBUG_KMS (hdata->dev,"%s : width[%d] x height[%d]\n" , + (hdata->dvi_mode ?"dvi monitor" :"hdmi monitor" ), + edid->width_cm, edid->height_cm);drm_connector_update_edid_property (connector, edid);cec_notifier_set_phys_addr_from_edid (hdata->notifier, edid);
@@ -908,7 +908,8 @@ static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)if (confs->data[i].pixel_clock == pixel_clock)return i; -DRM_DEBUG_KMS ("Could not find phy config for %d\n" , pixel_clock); +DRM_DEV_DEBUG_KMS (hdata->dev,"Could not find phy config for %d\n" , + pixel_clock);return -EINVAL ; }
@@ -918,10 +919,11 @@ static int hdmi_mode_valid(struct drm_connector *connector,struct hdmi_context *hdata =connector_to_hdmi (connector);int ret; -DRM_DEBUG_KMS ("xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n" , - mode->hdisplay, mode->vdisplay, mode->vrefresh, - (mode->flags &DRM_MODE_FLAG_INTERLACE ) ? true : - false, mode->clock *1000 ); +DRM_DEV_DEBUG_KMS (hdata->dev, +"xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n" , + mode->hdisplay, mode->vdisplay, mode->vrefresh, + (mode->flags &DRM_MODE_FLAG_INTERLACE ) ? true : + false, mode->clock *1000 ); ret =hdmi_find_phy_conf (hdata, mode->clock *1000 );if (ret <0 )
@@ -1003,8 +1005,10 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder,DRM_INFO ("desired mode doesn't exist so\n" );DRM_INFO ("use the most suitable mode among modes.\n" ); -DRM_DEBUG_KMS ("Adjusted Mode: [%d]x[%d] [%d]Hz\n" , - m->hdisplay, m->vdisplay, m->vrefresh); +DRM_DEV_DEBUG_KMS (dev->dev, +"Adjusted Mode: [%d]x[%d] [%d]Hz\n" , + m->hdisplay, m->vdisplay, + m->vrefresh);drm_mode_copy (adjusted_mode, m);break ;
@@ -1170,7 +1174,9 @@ static void hdmiphy_wait_for_pll(struct hdmi_context *hdata)u32 val =hdmi_reg_read (hdata,HDMI_PHY_STATUS );if (val &HDMI_PHY_STATUS_READY ) { -DRM_DEBUG_KMS ("PLL stabilized after %d tries\n" , tries); +DRM_DEV_DEBUG_KMS (hdata->dev, +"PLL stabilized after %d tries\n" , + tries);return ; }usleep_range (10 ,20 );
@@ -1461,7 +1467,8 @@ static void hdmiphy_enable(struct hdmi_context *hdata)pm_runtime_get_sync (hdata->dev);if (regulator_bulk_enable (ARRAY_SIZE (supply), hdata->regul_bulk)) -DRM_DEBUG_KMS ("failed to enable regulator bulk\n" ); +DRM_DEV_DEBUG_KMS (hdata->dev, +"failed to enable regulator bulk\n" );regmap_update_bits (hdata->pmureg,PMU_HDMI_PHY_CONTROL ,PMU_HDMI_PHY_ENABLE_BIT ,1 );
@@ -1753,7 +1760,7 @@ static int hdmi_resources_init(struct hdmi_context *hdata)struct device *dev = hdata->dev;int i, ret; -DRM_DEBUG_KMS ("HDMI resource init\n" ); +DRM_DEV_DEBUG_KMS (dev,"HDMI resource init\n" ); hdata->hpd_gpio =devm_gpiod_get (dev,"hpd" ,GPIOD_IN );if (IS_ERR (hdata->hpd_gpio)) {
drivers/gpu/drm/exynos/exynos_mixer.c +9 -8
@@ -228,8 +228,8 @@ static void mixer_regs_dump(struct mixer_context *ctx) {#define DUMPREG (reg_id) \ do { \ - DRM_DEBUG_KMS(#reg_id " = %08x\n", \ - (u32)readl(ctx->mixer_regs + reg_id)); \ + DRM_DEV_DEBUG_KMS(ctx->dev, #reg_id " = %08x\n", \ + (u32)readl(ctx->mixer_regs + reg_id)); \ } while (0)DUMPREG (MXR_STATUS );
@@ -260,8 +260,8 @@ static void vp_regs_dump(struct mixer_context *ctx) {#define DUMPREG (reg_id) \ do { \ - DRM_DEBUG_KMS(#reg_id " = %08x\n", \ - (u32) readl(ctx->vp_regs + reg_id)); \ + DRM_DEV_DEBUG_KMS(ctx->dev, #reg_id " = %08x\n", \ + (u32) readl(ctx->vp_regs + reg_id)); \ } while (0)DUMPREG (VP_ENABLE );
@@ -954,7 +954,7 @@ static void mixer_update_plane(struct exynos_drm_crtc *crtc, {struct mixer_context *mixer_ctx = crtc->ctx; -DRM_DEBUG_KMS ("win: %d\n" , plane->index); +DRM_DEV_DEBUG_KMS (mixer_ctx->dev,"win: %d\n" , plane->index);if (!test_bit (MXR_BIT_POWERED , &mixer_ctx->flags))return ;
@@ -971,7 +971,7 @@ static void mixer_disable_plane(struct exynos_drm_crtc *crtc,struct mixer_context *mixer_ctx = crtc->ctx;unsigned long flags; -DRM_DEBUG_KMS ("win: %d\n" , plane->index); +DRM_DEV_DEBUG_KMS (mixer_ctx->dev,"win: %d\n" , plane->index);if (!test_bit (MXR_BIT_POWERED , &mixer_ctx->flags))return ;
@@ -1048,8 +1048,9 @@ static int mixer_mode_valid(struct exynos_drm_crtc *crtc,struct mixer_context *ctx = crtc->ctx;u32 w = mode->hdisplay, h = mode->vdisplay; -DRM_DEBUG_KMS ("xres=%d, yres=%d, refresh=%d, intl=%d\n" , w, h, - mode->vrefresh, !!(mode->flags &DRM_MODE_FLAG_INTERLACE )); +DRM_DEV_DEBUG_KMS (ctx->dev,"xres=%d, yres=%d, refresh=%d, intl=%d\n" , + w, h, mode->vrefresh, + !!(mode->flags &DRM_MODE_FLAG_INTERLACE ));if (ctx->mxr_ver ==MXR_VER_128_0_0_184 )return MODE_OK ;
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 5/6 drm/exynos: vidi: replace platform_device pointer with device one
In reply to Inki DaeAdd device pointer to vidi_context and remove platform_device pointer.
It doesn't need for vidi_context to contain platform_device object. Instead, this patch makes this driver more simply by replacing platform_device pointer with device one.
--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 33 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_vidi.c +17 -16
@@ -40,8 +40,8 @@struct vidi_context {struct drm_encoder encoder; -struct platform_device *pdev;struct drm_device *drm_dev; +struct device *dev;struct exynos_drm_crtc *crtc;struct drm_connector connector;struct exynos_drm_plane planes[WINDOWS_NR ];
@@ -123,7 +123,7 @@ static void vidi_update_plane(struct exynos_drm_crtc *crtc,return ; addr =exynos_drm_fb_dma_addr (state->fb,0 ); -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"dma_addr = %pad\n" , &addr); +DRM_DEV_DEBUG_KMS (ctx->dev,"dma_addr = %pad\n" , &addr); }static void vidi_enable (struct exynos_drm_crtc *crtc)
@@ -226,19 +226,19 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,struct drm_exynos_vidi_connection *vidi = data;if (!vidi) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +DRM_DEV_DEBUG_KMS (ctx->dev,"user data for vidi is null.\n" );return -EINVAL ; }if (vidi->connection >1 ) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +DRM_DEV_DEBUG_KMS (ctx->dev,"connection should be 0 or 1.\n" );return -EINVAL ; }if (ctx->connected == vidi->connection) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +DRM_DEV_DEBUG_KMS (ctx->dev,"same connection request.\n" );return -EINVAL ; }
@@ -248,13 +248,13 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, raw_edid = (struct edid *)(unsigned long )vidi->edid;if (!drm_edid_is_valid (raw_edid)) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +DRM_DEV_DEBUG_KMS (ctx->dev,"edid data is invalid.\n" );return -EINVAL ; } ctx->raw_edid =drm_edid_duplicate (raw_edid);if (!ctx->raw_edid) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev, +DRM_DEV_DEBUG_KMS (ctx->dev,"failed to allocate raw_edid.\n" );return -ENOMEM ; }
@@ -313,14 +313,14 @@ static int vidi_get_modes(struct drm_connector *connector)* to ctx->raw_edid through specific ioctl. */ if (!ctx->raw_edid) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"raw_edid is null.\n" ); +DRM_DEV_DEBUG_KMS (ctx->dev,"raw_edid is null.\n" );return -EFAULT ; } edid_len = (1 + ctx->raw_edid->extensions) *EDID_LENGTH ; edid =kmemdup (ctx->raw_edid, edid_len,GFP_KERNEL );if (!edid) { -DRM_DEV_DEBUG_KMS (&ctx->pdev->dev,"failed to allocate edid\n" ); +DRM_DEV_DEBUG_KMS (ctx->dev,"failed to allocate edid\n" );return -ENOMEM ; }
@@ -344,7 +344,7 @@ static int vidi_create_connector(struct drm_encoder *encoder) ret =drm_connector_init (ctx->drm_dev, connector, &vidi_connector_funcs,DRM_MODE_CONNECTOR_VIRTUAL );if (ret) { -DRM_DEV_ERROR (ctx->drm_dev->dev, +DRM_DEV_ERROR (ctx->dev,"Failed to initialize connector with drm\n" );return ret; }
@@ -448,13 +448,14 @@ static const struct component_ops vidi_component_ops = {static int vidi_probe (struct platform_device *pdev) {struct vidi_context *ctx; +struct device *dev = &pdev->dev;int ret; - ctx =devm_kzalloc (&pdev->dev,sizeof (*ctx),GFP_KERNEL ); + ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)return -ENOMEM ; - ctx->pdev = pdev; + ctx->dev = dev;timer_setup (&ctx->timer, vidi_fake_vblank_timer,0 );
@@ -462,21 +463,21 @@ static int vidi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, ctx); - ret =device_create_file (&pdev->dev, &dev_attr_connection); + ret =device_create_file (dev, &dev_attr_connection);if (ret <0 ) { -DRM_DEV_ERROR (&pdev->dev, +DRM_DEV_ERROR (dev,"failed to create connection sysfs.\n" );return ret; } - ret =component_add (&pdev->dev, &vidi_component_ops); + ret =component_add (dev, &vidi_component_ops);if (ret) goto err_remove_file;return ret; err_remove_file: -device_remove_file (&pdev->dev, &dev_attr_connection); +device_remove_file (dev, &dev_attr_connection);return ret; }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerPATCH v3 6/6 drm/exynos: ipp: clean up debug messages
In reply to Inki DaePrint out debug messages with correct device name.
As for this, this patch adds device pointer to exynos_drm_ipp structure, and in case of exynos_drm_ipp_task structure, replace drm_device pointer with device one. This will make each ipp driver to print out debug messages with correct device name.
--- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 46 ++++++++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_ipp.h | 9 +++--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 5 ++-- 6 files changed, 40 insertions(+), 35 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +3 -2
@@ -1134,9 +1134,10 @@ static int fimc_bind(struct device *dev, struct device *master, void *data)struct exynos_drm_ipp *ipp = &ctx->ipp; ctx->drm_dev = drm_dev; + ipp->drm_dev = drm_dev;exynos_drm_register_dma (drm_dev, dev); -exynos_drm_ipp_register (drm_dev, ipp, &ipp_funcs, +exynos_drm_ipp_register (dev, ipp, &ipp_funcs,DRM_EXYNOS_IPP_CAP_CROP |DRM_EXYNOS_IPP_CAP_ROTATE |DRM_EXYNOS_IPP_CAP_SCALE |DRM_EXYNOS_IPP_CAP_CONVERT , ctx->formats, ctx->num_formats,"fimc" );
@@ -1153,7 +1154,7 @@ static void fimc_unbind(struct device *dev, struct device *master,struct drm_device *drm_dev = data;struct exynos_drm_ipp *ipp = &ctx->ipp; -exynos_drm_ipp_unregister (drm_dev, ipp); +exynos_drm_ipp_unregister (dev, ipp);exynos_drm_unregister_dma (drm_dev, dev); }
drivers/gpu/drm/exynos/exynos_drm_gsc.c +3 -2
@@ -1170,9 +1170,10 @@ static int gsc_bind(struct device *dev, struct device *master, void *data)struct exynos_drm_ipp *ipp = &ctx->ipp; ctx->drm_dev = drm_dev; + ctx->drm_dev = drm_dev;exynos_drm_register_dma (drm_dev, dev); -exynos_drm_ipp_register (drm_dev, ipp, &ipp_funcs, +exynos_drm_ipp_register (dev, ipp, &ipp_funcs,DRM_EXYNOS_IPP_CAP_CROP |DRM_EXYNOS_IPP_CAP_ROTATE |DRM_EXYNOS_IPP_CAP_SCALE |DRM_EXYNOS_IPP_CAP_CONVERT , ctx->formats, ctx->num_formats,"gsc" );
@@ -1189,7 +1190,7 @@ static void gsc_unbind(struct device *dev, struct device *master,struct drm_device *drm_dev = data;struct exynos_drm_ipp *ipp = &ctx->ipp; -exynos_drm_ipp_unregister (drm_dev, ipp); +exynos_drm_ipp_unregister (dev, ipp);exynos_drm_unregister_dma (drm_dev, dev); }
drivers/gpu/drm/exynos/exynos_drm_ipp.c +23 -23
179 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_ipp.h +5 -4
@@ -54,7 +54,8 @@ struct exynos_drm_ipp_funcs {* struct exynos_drm_ipp - central picture processor module structure */ struct exynos_drm_ipp { -struct drm_device *dev; +struct drm_device *drm_dev; +struct device *dev;struct list_head head;unsigned int id;
@@ -85,7 +86,7 @@ struct exynos_drm_ipp_buffer {* has to be performed by the picture processor hardware module */ struct exynos_drm_ipp_task { -struct drm_device *dev; +struct device *dev;struct exynos_drm_ipp *ipp;struct list_head head;
@@ -129,11 +130,11 @@ struct exynos_drm_ipp_formats { #define IPP_SCALE_LIMIT(val...) \ .type = (DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE), val -int exynos_drm_ipp_register (struct drm_device *dev,struct exynos_drm_ipp *ipp, +int exynos_drm_ipp_register (struct device *dev,struct exynos_drm_ipp *ipp,const struct exynos_drm_ipp_funcs *funcs,unsigned int caps,const struct exynos_drm_ipp_formats *formats,unsigned int num_formats,const char *name); -void exynos_drm_ipp_unregister (struct drm_device *dev, +void exynos_drm_ipp_unregister (struct device *dev,struct exynos_drm_ipp *ipp);void exynos_drm_ipp_task_done (struct exynos_drm_ipp_task *task,int ret);
drivers/gpu/drm/exynos/exynos_drm_rotator.c +3 -2
@@ -243,9 +243,10 @@ static int rotator_bind(struct device *dev, struct device *master, void *data)struct exynos_drm_ipp *ipp = &rot->ipp; rot->drm_dev = drm_dev; + ipp->drm_dev = drm_dev;exynos_drm_register_dma (drm_dev, dev); -exynos_drm_ipp_register (drm_dev, ipp, &ipp_funcs, +exynos_drm_ipp_register (dev, ipp, &ipp_funcs,DRM_EXYNOS_IPP_CAP_CROP |DRM_EXYNOS_IPP_CAP_ROTATE , rot->formats, rot->num_formats,"rotator" );
@@ -261,7 +262,7 @@ static void rotator_unbind(struct device *dev, struct device *master,struct drm_device *drm_dev = data;struct exynos_drm_ipp *ipp = &rot->ipp; -exynos_drm_ipp_unregister (drm_dev, ipp); +exynos_drm_ipp_unregister (dev, ipp);exynos_drm_unregister_dma (rot->drm_dev, rot->dev); }
drivers/gpu/drm/exynos/exynos_drm_scaler.c +3 -2
@@ -451,9 +451,10 @@ static int scaler_bind(struct device *dev, struct device *master, void *data)struct exynos_drm_ipp *ipp = &scaler->ipp; scaler->drm_dev = drm_dev; + ipp->drm_dev = drm_dev;exynos_drm_register_dma (drm_dev, dev); - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, scaler->scaler_data->formats,
@@ -471,7 +472,7 @@ static void scaler_unbind(struct device *dev, struct device *master,struct drm_device *drm_dev = data;struct exynos_drm_ipp *ipp = &scaler->ipp; -exynos_drm_ipp_unregister (drm_dev, ipp); +exynos_drm_ipp_unregister (dev, ipp);exynos_drm_unregister_dma (scaler->drm_dev, scaler->dev); }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel