| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2012 Samsung Electronics Co.Ltd |
|---|
| 3 | 4 | * Authors: |
|---|
| 4 | 5 | * Eunchul Kim <chulspro.kim@samsung.com> |
|---|
| 5 | 6 | * Jinyoung Jeon <jy0.jeon@samsung.com> |
|---|
| 6 | 7 | * Sangmin Lee <lsmin.lee@samsung.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | 8 | */ |
|---|
| 14 | | -#include <linux/kernel.h> |
|---|
| 15 | | -#include <linux/component.h> |
|---|
| 16 | | -#include <linux/platform_device.h> |
|---|
| 17 | | -#include <linux/mfd/syscon.h> |
|---|
| 18 | | -#include <linux/regmap.h> |
|---|
| 9 | + |
|---|
| 19 | 10 | #include <linux/clk.h> |
|---|
| 20 | | -#include <linux/pm_runtime.h> |
|---|
| 11 | +#include <linux/component.h> |
|---|
| 12 | +#include <linux/kernel.h> |
|---|
| 13 | +#include <linux/mfd/syscon.h> |
|---|
| 21 | 14 | #include <linux/of.h> |
|---|
| 15 | +#include <linux/platform_device.h> |
|---|
| 16 | +#include <linux/pm_runtime.h> |
|---|
| 17 | +#include <linux/regmap.h> |
|---|
| 22 | 18 | #include <linux/spinlock.h> |
|---|
| 23 | 19 | |
|---|
| 24 | | -#include <drm/drmP.h> |
|---|
| 20 | +#include <drm/drm_fourcc.h> |
|---|
| 21 | +#include <drm/drm_print.h> |
|---|
| 25 | 22 | #include <drm/exynos_drm.h> |
|---|
| 26 | | -#include "regs-fimc.h" |
|---|
| 23 | + |
|---|
| 27 | 24 | #include "exynos_drm_drv.h" |
|---|
| 28 | | -#include "exynos_drm_iommu.h" |
|---|
| 29 | 25 | #include "exynos_drm_ipp.h" |
|---|
| 26 | +#include "regs-fimc.h" |
|---|
| 30 | 27 | |
|---|
| 31 | 28 | /* |
|---|
| 32 | 29 | * FIMC stands for Fully Interactive Mobile Camera and |
|---|
| .. | .. |
|---|
| 49 | 46 | module_param_named(fimc_devs, fimc_mask, uint, 0644); |
|---|
| 50 | 47 | MODULE_PARM_DESC(fimc_devs, "Alias mask for assigning FIMC devices to Exynos DRM"); |
|---|
| 51 | 48 | |
|---|
| 52 | | -#define get_fimc_context(dev) platform_get_drvdata(to_platform_device(dev)) |
|---|
| 49 | +#define get_fimc_context(dev) dev_get_drvdata(dev) |
|---|
| 53 | 50 | |
|---|
| 54 | 51 | enum { |
|---|
| 55 | 52 | FIMC_CLK_LCLK, |
|---|
| .. | .. |
|---|
| 100 | 97 | struct fimc_context { |
|---|
| 101 | 98 | struct exynos_drm_ipp ipp; |
|---|
| 102 | 99 | struct drm_device *drm_dev; |
|---|
| 100 | + void *dma_priv; |
|---|
| 103 | 101 | struct device *dev; |
|---|
| 104 | 102 | struct exynos_drm_ipp_task *task; |
|---|
| 105 | 103 | struct exynos_drm_ipp_formats *formats; |
|---|
| .. | .. |
|---|
| 187 | 185 | { |
|---|
| 188 | 186 | u32 cfg; |
|---|
| 189 | 187 | |
|---|
| 190 | | - DRM_DEBUG_KMS("enable[%d]\n", enable); |
|---|
| 188 | + DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
|---|
| 191 | 189 | |
|---|
| 192 | 190 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
|---|
| 193 | 191 | if (enable) |
|---|
| .. | .. |
|---|
| 202 | 200 | { |
|---|
| 203 | 201 | u32 cfg; |
|---|
| 204 | 202 | |
|---|
| 205 | | - DRM_DEBUG_KMS("enable[%d]\n", enable); |
|---|
| 203 | + DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
|---|
| 206 | 204 | |
|---|
| 207 | 205 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
|---|
| 208 | 206 | if (enable) { |
|---|
| .. | .. |
|---|
| 226 | 224 | flag = EXYNOS_CISTATUS_OVFIY | EXYNOS_CISTATUS_OVFICB | |
|---|
| 227 | 225 | EXYNOS_CISTATUS_OVFICR; |
|---|
| 228 | 226 | |
|---|
| 229 | | - DRM_DEBUG_KMS("flag[0x%x]\n", flag); |
|---|
| 227 | + DRM_DEV_DEBUG_KMS(ctx->dev, "flag[0x%x]\n", flag); |
|---|
| 230 | 228 | |
|---|
| 231 | 229 | if (status & flag) { |
|---|
| 232 | 230 | fimc_set_bits(ctx, EXYNOS_CIWDOFST, |
|---|
| 233 | 231 | EXYNOS_CIWDOFST_CLROVFIY | EXYNOS_CIWDOFST_CLROVFICB | |
|---|
| 234 | 232 | EXYNOS_CIWDOFST_CLROVFICR); |
|---|
| 235 | 233 | |
|---|
| 236 | | - dev_err(ctx->dev, "occurred overflow at %d, status 0x%x.\n", |
|---|
| 237 | | - ctx->id, status); |
|---|
| 234 | + DRM_DEV_ERROR(ctx->dev, |
|---|
| 235 | + "occurred overflow at %d, status 0x%x.\n", |
|---|
| 236 | + ctx->id, status); |
|---|
| 238 | 237 | return true; |
|---|
| 239 | 238 | } |
|---|
| 240 | 239 | |
|---|
| .. | .. |
|---|
| 247 | 246 | |
|---|
| 248 | 247 | cfg = fimc_read(ctx, EXYNOS_CISTATUS); |
|---|
| 249 | 248 | |
|---|
| 250 | | - DRM_DEBUG_KMS("cfg[0x%x]\n", cfg); |
|---|
| 249 | + DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]\n", cfg); |
|---|
| 251 | 250 | |
|---|
| 252 | 251 | if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) |
|---|
| 253 | 252 | return false; |
|---|
| .. | .. |
|---|
| 269 | 268 | if (frame_cnt == 0) |
|---|
| 270 | 269 | frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); |
|---|
| 271 | 270 | |
|---|
| 272 | | - DRM_DEBUG_KMS("present[%d]before[%d]\n", |
|---|
| 273 | | - EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), |
|---|
| 274 | | - EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); |
|---|
| 271 | + DRM_DEV_DEBUG_KMS(ctx->dev, "present[%d]before[%d]\n", |
|---|
| 272 | + EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), |
|---|
| 273 | + EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); |
|---|
| 275 | 274 | |
|---|
| 276 | 275 | if (frame_cnt == 0) { |
|---|
| 277 | | - DRM_ERROR("failed to get frame count.\n"); |
|---|
| 276 | + DRM_DEV_ERROR(ctx->dev, "failed to get frame count.\n"); |
|---|
| 278 | 277 | return -EIO; |
|---|
| 279 | 278 | } |
|---|
| 280 | 279 | |
|---|
| 281 | 280 | buf_id = frame_cnt - 1; |
|---|
| 282 | | - DRM_DEBUG_KMS("buf_id[%d]\n", buf_id); |
|---|
| 281 | + DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]\n", buf_id); |
|---|
| 283 | 282 | |
|---|
| 284 | 283 | return buf_id; |
|---|
| 285 | 284 | } |
|---|
| .. | .. |
|---|
| 288 | 287 | { |
|---|
| 289 | 288 | u32 cfg; |
|---|
| 290 | 289 | |
|---|
| 291 | | - DRM_DEBUG_KMS("enable[%d]\n", enable); |
|---|
| 290 | + DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
|---|
| 292 | 291 | |
|---|
| 293 | 292 | cfg = fimc_read(ctx, EXYNOS_CIOCTRL); |
|---|
| 294 | 293 | if (enable) |
|---|
| .. | .. |
|---|
| 303 | 302 | { |
|---|
| 304 | 303 | u32 cfg; |
|---|
| 305 | 304 | |
|---|
| 306 | | - DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); |
|---|
| 305 | + DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
|---|
| 307 | 306 | |
|---|
| 308 | 307 | /* RGB */ |
|---|
| 309 | 308 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
|---|
| .. | .. |
|---|
| 368 | 367 | { |
|---|
| 369 | 368 | u32 cfg; |
|---|
| 370 | 369 | |
|---|
| 371 | | - DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); |
|---|
| 370 | + DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
|---|
| 372 | 371 | |
|---|
| 373 | 372 | cfg = fimc_read(ctx, EXYNOS_MSCTRL); |
|---|
| 374 | 373 | cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; |
|---|
| .. | .. |
|---|
| 421 | 420 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; |
|---|
| 422 | 421 | u32 cfg1, cfg2; |
|---|
| 423 | 422 | |
|---|
| 424 | | - DRM_DEBUG_KMS("rotation[%x]\n", rotation); |
|---|
| 423 | + DRM_DEV_DEBUG_KMS(ctx->dev, "rotation[%x]\n", rotation); |
|---|
| 425 | 424 | |
|---|
| 426 | 425 | cfg1 = fimc_read(ctx, EXYNOS_MSCTRL); |
|---|
| 427 | 426 | cfg1 &= ~(EXYNOS_MSCTRL_FLIP_X_MIRROR | |
|---|
| .. | .. |
|---|
| 479 | 478 | v1 = buf->rect.y; |
|---|
| 480 | 479 | v2 = buf->buf.height - buf->rect.h - buf->rect.y; |
|---|
| 481 | 480 | |
|---|
| 482 | | - DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n", |
|---|
| 483 | | - buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h, |
|---|
| 484 | | - real_width, buf->buf.height); |
|---|
| 485 | | - DRM_DEBUG_KMS("h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, v2); |
|---|
| 481 | + DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n", |
|---|
| 482 | + buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h, |
|---|
| 483 | + real_width, buf->buf.height); |
|---|
| 484 | + DRM_DEV_DEBUG_KMS(ctx->dev, "h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, |
|---|
| 485 | + v2); |
|---|
| 486 | 486 | |
|---|
| 487 | 487 | /* |
|---|
| 488 | 488 | * set window offset 1, 2 size |
|---|
| .. | .. |
|---|
| 507 | 507 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; |
|---|
| 508 | 508 | u32 cfg; |
|---|
| 509 | 509 | |
|---|
| 510 | | - DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height); |
|---|
| 510 | + DRM_DEV_DEBUG_KMS(ctx->dev, "hsize[%d]vsize[%d]\n", real_width, |
|---|
| 511 | + buf->buf.height); |
|---|
| 511 | 512 | |
|---|
| 512 | 513 | /* original size */ |
|---|
| 513 | 514 | cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) | |
|---|
| .. | .. |
|---|
| 515 | 516 | |
|---|
| 516 | 517 | fimc_write(ctx, cfg, EXYNOS_ORGISIZE); |
|---|
| 517 | 518 | |
|---|
| 518 | | - DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, buf->rect.y, |
|---|
| 519 | | - buf->rect.w, buf->rect.h); |
|---|
| 519 | + DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, |
|---|
| 520 | + buf->rect.y, buf->rect.w, buf->rect.h); |
|---|
| 520 | 521 | |
|---|
| 521 | 522 | /* set input DMA image size */ |
|---|
| 522 | 523 | cfg = fimc_read(ctx, EXYNOS_CIREAL_ISIZE); |
|---|
| .. | .. |
|---|
| 561 | 562 | { |
|---|
| 562 | 563 | u32 cfg; |
|---|
| 563 | 564 | |
|---|
| 564 | | - DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); |
|---|
| 565 | + DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
|---|
| 565 | 566 | |
|---|
| 566 | 567 | /* RGB */ |
|---|
| 567 | 568 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
|---|
| .. | .. |
|---|
| 632 | 633 | { |
|---|
| 633 | 634 | u32 cfg; |
|---|
| 634 | 635 | |
|---|
| 635 | | - DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); |
|---|
| 636 | + DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
|---|
| 636 | 637 | |
|---|
| 637 | 638 | cfg = fimc_read(ctx, EXYNOS_CIEXTEN); |
|---|
| 638 | 639 | |
|---|
| .. | .. |
|---|
| 692 | 693 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; |
|---|
| 693 | 694 | u32 cfg; |
|---|
| 694 | 695 | |
|---|
| 695 | | - DRM_DEBUG_KMS("rotation[0x%x]\n", rotation); |
|---|
| 696 | + DRM_DEV_DEBUG_KMS(ctx->dev, "rotation[0x%x]\n", rotation); |
|---|
| 696 | 697 | |
|---|
| 697 | 698 | cfg = fimc_read(ctx, EXYNOS_CITRGFMT); |
|---|
| 698 | 699 | cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; |
|---|
| .. | .. |
|---|
| 776 | 777 | |
|---|
| 777 | 778 | pre_dst_width = src_w >> hfactor; |
|---|
| 778 | 779 | pre_dst_height = src_h >> vfactor; |
|---|
| 779 | | - DRM_DEBUG_KMS("pre_dst_width[%d]pre_dst_height[%d]\n", |
|---|
| 780 | | - pre_dst_width, pre_dst_height); |
|---|
| 781 | | - DRM_DEBUG_KMS("hfactor[%d]vfactor[%d]\n", hfactor, vfactor); |
|---|
| 780 | + DRM_DEV_DEBUG_KMS(ctx->dev, "pre_dst_width[%d]pre_dst_height[%d]\n", |
|---|
| 781 | + pre_dst_width, pre_dst_height); |
|---|
| 782 | + DRM_DEV_DEBUG_KMS(ctx->dev, "hfactor[%d]vfactor[%d]\n", hfactor, |
|---|
| 783 | + vfactor); |
|---|
| 782 | 784 | |
|---|
| 783 | 785 | sc->hratio = (src_w << 14) / (dst_w << hfactor); |
|---|
| 784 | 786 | sc->vratio = (src_h << 14) / (dst_h << vfactor); |
|---|
| 785 | 787 | sc->up_h = (dst_w >= src_w) ? true : false; |
|---|
| 786 | 788 | sc->up_v = (dst_h >= src_h) ? true : false; |
|---|
| 787 | | - DRM_DEBUG_KMS("hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n", |
|---|
| 788 | | - sc->hratio, sc->vratio, sc->up_h, sc->up_v); |
|---|
| 789 | + DRM_DEV_DEBUG_KMS(ctx->dev, "hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n", |
|---|
| 790 | + sc->hratio, sc->vratio, sc->up_h, sc->up_v); |
|---|
| 789 | 791 | |
|---|
| 790 | 792 | shfactor = FIMC_SHFACTOR - (hfactor + vfactor); |
|---|
| 791 | | - DRM_DEBUG_KMS("shfactor[%d]\n", shfactor); |
|---|
| 793 | + DRM_DEV_DEBUG_KMS(ctx->dev, "shfactor[%d]\n", shfactor); |
|---|
| 792 | 794 | |
|---|
| 793 | 795 | cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | |
|---|
| 794 | 796 | EXYNOS_CISCPRERATIO_PREHORRATIO(1 << hfactor) | |
|---|
| .. | .. |
|---|
| 806 | 808 | { |
|---|
| 807 | 809 | u32 cfg, cfg_ext; |
|---|
| 808 | 810 | |
|---|
| 809 | | - DRM_DEBUG_KMS("range[%d]bypass[%d]up_h[%d]up_v[%d]\n", |
|---|
| 810 | | - sc->range, sc->bypass, sc->up_h, sc->up_v); |
|---|
| 811 | | - DRM_DEBUG_KMS("hratio[%d]vratio[%d]\n", |
|---|
| 812 | | - sc->hratio, sc->vratio); |
|---|
| 811 | + DRM_DEV_DEBUG_KMS(ctx->dev, "range[%d]bypass[%d]up_h[%d]up_v[%d]\n", |
|---|
| 812 | + sc->range, sc->bypass, sc->up_h, sc->up_v); |
|---|
| 813 | + DRM_DEV_DEBUG_KMS(ctx->dev, "hratio[%d]vratio[%d]\n", |
|---|
| 814 | + sc->hratio, sc->vratio); |
|---|
| 813 | 815 | |
|---|
| 814 | 816 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
|---|
| 815 | 817 | cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | |
|---|
| .. | .. |
|---|
| 847 | 849 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; |
|---|
| 848 | 850 | u32 cfg, cfg_ext; |
|---|
| 849 | 851 | |
|---|
| 850 | | - DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height); |
|---|
| 852 | + DRM_DEV_DEBUG_KMS(ctx->dev, "hsize[%d]vsize[%d]\n", real_width, |
|---|
| 853 | + buf->buf.height); |
|---|
| 851 | 854 | |
|---|
| 852 | 855 | /* original size */ |
|---|
| 853 | 856 | cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) | |
|---|
| .. | .. |
|---|
| 855 | 858 | |
|---|
| 856 | 859 | fimc_write(ctx, cfg, EXYNOS_ORGOSIZE); |
|---|
| 857 | 860 | |
|---|
| 858 | | - DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, buf->rect.y, |
|---|
| 859 | | - buf->rect.w, buf->rect.h); |
|---|
| 861 | + DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, |
|---|
| 862 | + buf->rect.y, |
|---|
| 863 | + buf->rect.w, buf->rect.h); |
|---|
| 860 | 864 | |
|---|
| 861 | 865 | /* CSC ITU */ |
|---|
| 862 | 866 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
|---|
| .. | .. |
|---|
| 906 | 910 | u32 buf_num; |
|---|
| 907 | 911 | u32 cfg; |
|---|
| 908 | 912 | |
|---|
| 909 | | - DRM_DEBUG_KMS("buf_id[%d]enqueu[%d]\n", buf_id, enqueue); |
|---|
| 913 | + DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]enqueu[%d]\n", buf_id, enqueue); |
|---|
| 910 | 914 | |
|---|
| 911 | 915 | spin_lock_irqsave(&ctx->lock, flags); |
|---|
| 912 | 916 | |
|---|
| .. | .. |
|---|
| 946 | 950 | struct fimc_context *ctx = dev_id; |
|---|
| 947 | 951 | int buf_id; |
|---|
| 948 | 952 | |
|---|
| 949 | | - DRM_DEBUG_KMS("fimc id[%d]\n", ctx->id); |
|---|
| 953 | + DRM_DEV_DEBUG_KMS(ctx->dev, "fimc id[%d]\n", ctx->id); |
|---|
| 950 | 954 | |
|---|
| 951 | 955 | fimc_clear_irq(ctx); |
|---|
| 952 | 956 | if (fimc_check_ovf(ctx)) |
|---|
| .. | .. |
|---|
| 959 | 963 | if (buf_id < 0) |
|---|
| 960 | 964 | return IRQ_HANDLED; |
|---|
| 961 | 965 | |
|---|
| 962 | | - DRM_DEBUG_KMS("buf_id[%d]\n", buf_id); |
|---|
| 966 | + DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]\n", buf_id); |
|---|
| 963 | 967 | |
|---|
| 964 | 968 | if (ctx->task) { |
|---|
| 965 | 969 | struct exynos_drm_ipp_task *task = ctx->task; |
|---|
| .. | .. |
|---|
| 1129 | 1133 | struct exynos_drm_ipp *ipp = &ctx->ipp; |
|---|
| 1130 | 1134 | |
|---|
| 1131 | 1135 | ctx->drm_dev = drm_dev; |
|---|
| 1132 | | - drm_iommu_attach_device(drm_dev, dev); |
|---|
| 1136 | + ipp->drm_dev = drm_dev; |
|---|
| 1137 | + exynos_drm_register_dma(drm_dev, dev, &ctx->dma_priv); |
|---|
| 1133 | 1138 | |
|---|
| 1134 | | - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, |
|---|
| 1139 | + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, |
|---|
| 1135 | 1140 | DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | |
|---|
| 1136 | 1141 | DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, |
|---|
| 1137 | 1142 | ctx->formats, ctx->num_formats, "fimc"); |
|---|
| .. | .. |
|---|
| 1148 | 1153 | struct drm_device *drm_dev = data; |
|---|
| 1149 | 1154 | struct exynos_drm_ipp *ipp = &ctx->ipp; |
|---|
| 1150 | 1155 | |
|---|
| 1151 | | - exynos_drm_ipp_unregister(drm_dev, ipp); |
|---|
| 1152 | | - drm_iommu_detach_device(drm_dev, dev); |
|---|
| 1156 | + exynos_drm_ipp_unregister(dev, ipp); |
|---|
| 1157 | + exynos_drm_unregister_dma(drm_dev, dev, &ctx->dma_priv); |
|---|
| 1153 | 1158 | } |
|---|
| 1154 | 1159 | |
|---|
| 1155 | 1160 | static const struct component_ops fimc_component_ops = { |
|---|
| .. | .. |
|---|
| 1381 | 1386 | { |
|---|
| 1382 | 1387 | struct fimc_context *ctx = get_fimc_context(dev); |
|---|
| 1383 | 1388 | |
|---|
| 1384 | | - DRM_DEBUG_KMS("id[%d]\n", ctx->id); |
|---|
| 1389 | + DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
|---|
| 1385 | 1390 | clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]); |
|---|
| 1386 | 1391 | return 0; |
|---|
| 1387 | 1392 | } |
|---|
| .. | .. |
|---|
| 1390 | 1395 | { |
|---|
| 1391 | 1396 | struct fimc_context *ctx = get_fimc_context(dev); |
|---|
| 1392 | 1397 | |
|---|
| 1393 | | - DRM_DEBUG_KMS("id[%d]\n", ctx->id); |
|---|
| 1398 | + DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
|---|
| 1394 | 1399 | return clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]); |
|---|
| 1395 | 1400 | } |
|---|
| 1396 | 1401 | #endif |
|---|