From: kernel test robot <lkp@intel.com>
To: Jackie Liu <liu.yun@linux.dev>,
laurent.pinchart@ideasonboard.com,
dri-devel@lists.freedesktop.org
Cc: airlied@linux.ie, liuyun01@kylinos.cn,
kieran.bingham+renesas@ideasonboard.com, kbuild-all@lists.01.org
Subject: Re: [PATCH] drm: rcar-du: crtc: force depends on cmm
Date: Thu, 29 Jul 2021 03:34:53 +0800 [thread overview]
Message-ID: <202107290329.PcxMAGh8-lkp@intel.com> (raw)
In-Reply-To: <20210728084240.566677-1-liu.yun@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 11815 bytes --]
Hi Jackie,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinchartl-media/drm/du/next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next v5.14-rc3 next-20210727]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jackie-Liu/drm-rcar-du-crtc-force-depends-on-cmm/20210728-222353
base: git://linuxtv.org/pinchartl/media.git drm/du/next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/d8277431962a65912c00e968b5df7bf103cda67a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jackie-Liu/drm-rcar-du-crtc-force-depends-on-cmm/20210728-222353
git checkout d8277431962a65912c00e968b5df7bf103cda67a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/rcar-du/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:81:5: error: redefinition of 'rcar_cmm_setup'
81 | int rcar_cmm_setup(struct platform_device *pdev,
| ^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:51:19: note: previous definition of 'rcar_cmm_setup' was here
51 | static inline int rcar_cmm_setup(struct platform_device *pdev,
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:121:5: error: redefinition of 'rcar_cmm_enable'
121 | int rcar_cmm_enable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:42:19: note: previous definition of 'rcar_cmm_enable' was here
42 | static inline int rcar_cmm_enable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:143:6: error: redefinition of 'rcar_cmm_disable'
143 | void rcar_cmm_disable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:47:20: note: previous definition of 'rcar_cmm_disable' was here
47 | static inline void rcar_cmm_disable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:161:5: error: redefinition of 'rcar_cmm_init'
161 | int rcar_cmm_init(struct platform_device *pdev)
| ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:37:19: note: previous definition of 'rcar_cmm_init' was here
37 | static inline int rcar_cmm_init(struct platform_device *pdev)
| ^~~~~~~~~~~~~
vim +/rcar_cmm_setup +81 drivers/gpu/drm/rcar-du/rcar_cmm.c
e08e934d6c289ed Jacopo Mondi 2019-10-17 64
e08e934d6c289ed Jacopo Mondi 2019-10-17 65 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 66 * rcar_cmm_setup() - Configure the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 67 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 68 * @config: The CMM unit configuration
e08e934d6c289ed Jacopo Mondi 2019-10-17 69 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 70 * Configure the CMM unit with the given configuration. Currently enabling,
e08e934d6c289ed Jacopo Mondi 2019-10-17 71 * disabling and programming of the 1-D LUT unit is supported.
e08e934d6c289ed Jacopo Mondi 2019-10-17 72 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 73 * As rcar_cmm_setup() accesses the CMM registers the unit should be powered
e08e934d6c289ed Jacopo Mondi 2019-10-17 74 * and its functional clock enabled. To guarantee this, before any call to
e08e934d6c289ed Jacopo Mondi 2019-10-17 75 * this function is made, the CMM unit has to be enabled by calling
e08e934d6c289ed Jacopo Mondi 2019-10-17 76 * rcar_cmm_enable() first.
e08e934d6c289ed Jacopo Mondi 2019-10-17 77 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 78 * TODO: Add support for LUT double buffer operations to avoid updating the
e08e934d6c289ed Jacopo Mondi 2019-10-17 79 * LUT table entries while a frame is being displayed.
e08e934d6c289ed Jacopo Mondi 2019-10-17 80 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @81 int rcar_cmm_setup(struct platform_device *pdev,
e08e934d6c289ed Jacopo Mondi 2019-10-17 82 const struct rcar_cmm_config *config)
e08e934d6c289ed Jacopo Mondi 2019-10-17 83 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 84 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 85
e08e934d6c289ed Jacopo Mondi 2019-10-17 86 /* Disable LUT if no table is provided. */
e08e934d6c289ed Jacopo Mondi 2019-10-17 87 if (!config->lut.table) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 88 if (rcmm->lut.enabled) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 89 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0);
e08e934d6c289ed Jacopo Mondi 2019-10-17 90 rcmm->lut.enabled = false;
e08e934d6c289ed Jacopo Mondi 2019-10-17 91 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 92
e08e934d6c289ed Jacopo Mondi 2019-10-17 93 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 94 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 95
e08e934d6c289ed Jacopo Mondi 2019-10-17 96 /* Enable LUT and program the new gamma table values. */
e08e934d6c289ed Jacopo Mondi 2019-10-17 97 if (!rcmm->lut.enabled) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 98 rcar_cmm_write(rcmm, CM2_LUT_CTRL, CM2_LUT_CTRL_LUT_EN);
e08e934d6c289ed Jacopo Mondi 2019-10-17 99 rcmm->lut.enabled = true;
e08e934d6c289ed Jacopo Mondi 2019-10-17 100 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 101
e08e934d6c289ed Jacopo Mondi 2019-10-17 102 rcar_cmm_lut_write(rcmm, config->lut.table);
e08e934d6c289ed Jacopo Mondi 2019-10-17 103
e08e934d6c289ed Jacopo Mondi 2019-10-17 104 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 105 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 106 EXPORT_SYMBOL_GPL(rcar_cmm_setup);
e08e934d6c289ed Jacopo Mondi 2019-10-17 107
e08e934d6c289ed Jacopo Mondi 2019-10-17 108 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 109 * rcar_cmm_enable() - Enable the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 110 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 111 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 112 * When the output of the corresponding DU channel is routed to the CMM unit,
e08e934d6c289ed Jacopo Mondi 2019-10-17 113 * the unit shall be enabled before the DU channel is started, and remain
e08e934d6c289ed Jacopo Mondi 2019-10-17 114 * enabled until the channel is stopped. The CMM unit shall be disabled with
e08e934d6c289ed Jacopo Mondi 2019-10-17 115 * rcar_cmm_disable().
e08e934d6c289ed Jacopo Mondi 2019-10-17 116 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 117 * Calls to rcar_cmm_enable() and rcar_cmm_disable() are not reference-counted.
e08e934d6c289ed Jacopo Mondi 2019-10-17 118 * It is an error to attempt to enable an already enabled CMM unit, or to
e08e934d6c289ed Jacopo Mondi 2019-10-17 119 * attempt to disable a disabled unit.
e08e934d6c289ed Jacopo Mondi 2019-10-17 120 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @121 int rcar_cmm_enable(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 122 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 123 int ret;
e08e934d6c289ed Jacopo Mondi 2019-10-17 124
136ce7684bc1ff4 Qinglang Miao 2020-11-27 125 ret = pm_runtime_resume_and_get(&pdev->dev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 126 if (ret < 0)
e08e934d6c289ed Jacopo Mondi 2019-10-17 127 return ret;
e08e934d6c289ed Jacopo Mondi 2019-10-17 128
e08e934d6c289ed Jacopo Mondi 2019-10-17 129 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 130 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 131 EXPORT_SYMBOL_GPL(rcar_cmm_enable);
e08e934d6c289ed Jacopo Mondi 2019-10-17 132
e08e934d6c289ed Jacopo Mondi 2019-10-17 133 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 134 * rcar_cmm_disable() - Disable the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 135 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 136 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 137 * See rcar_cmm_enable() for usage information.
e08e934d6c289ed Jacopo Mondi 2019-10-17 138 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 139 * Disabling the CMM unit disable all the internal processing blocks. The CMM
e08e934d6c289ed Jacopo Mondi 2019-10-17 140 * state shall thus be restored with rcar_cmm_setup() when re-enabling the CMM
e08e934d6c289ed Jacopo Mondi 2019-10-17 141 * unit after the next rcar_cmm_enable() call.
e08e934d6c289ed Jacopo Mondi 2019-10-17 142 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @143 void rcar_cmm_disable(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 144 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 145 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 146
e08e934d6c289ed Jacopo Mondi 2019-10-17 147 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0);
e08e934d6c289ed Jacopo Mondi 2019-10-17 148 rcmm->lut.enabled = false;
e08e934d6c289ed Jacopo Mondi 2019-10-17 149
e08e934d6c289ed Jacopo Mondi 2019-10-17 150 pm_runtime_put(&pdev->dev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 151 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 152 EXPORT_SYMBOL_GPL(rcar_cmm_disable);
e08e934d6c289ed Jacopo Mondi 2019-10-17 153
e08e934d6c289ed Jacopo Mondi 2019-10-17 154 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 155 * rcar_cmm_init() - Initialize the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 156 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 157 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 158 * Return: 0 on success, -EPROBE_DEFER if the CMM is not available yet,
e08e934d6c289ed Jacopo Mondi 2019-10-17 159 * -ENODEV if the DRM_RCAR_CMM config option is disabled
e08e934d6c289ed Jacopo Mondi 2019-10-17 160 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @161 int rcar_cmm_init(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 162 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 163 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 164
e08e934d6c289ed Jacopo Mondi 2019-10-17 165 if (!rcmm)
e08e934d6c289ed Jacopo Mondi 2019-10-17 166 return -EPROBE_DEFER;
e08e934d6c289ed Jacopo Mondi 2019-10-17 167
e08e934d6c289ed Jacopo Mondi 2019-10-17 168 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 169 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 170 EXPORT_SYMBOL_GPL(rcar_cmm_init);
e08e934d6c289ed Jacopo Mondi 2019-10-17 171
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54032 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] drm: rcar-du: crtc: force depends on cmm
Date: Thu, 29 Jul 2021 03:34:53 +0800 [thread overview]
Message-ID: <202107290329.PcxMAGh8-lkp@intel.com> (raw)
In-Reply-To: <20210728084240.566677-1-liu.yun@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 11992 bytes --]
Hi Jackie,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinchartl-media/drm/du/next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next v5.14-rc3 next-20210727]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jackie-Liu/drm-rcar-du-crtc-force-depends-on-cmm/20210728-222353
base: git://linuxtv.org/pinchartl/media.git drm/du/next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/d8277431962a65912c00e968b5df7bf103cda67a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jackie-Liu/drm-rcar-du-crtc-force-depends-on-cmm/20210728-222353
git checkout d8277431962a65912c00e968b5df7bf103cda67a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/rcar-du/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:81:5: error: redefinition of 'rcar_cmm_setup'
81 | int rcar_cmm_setup(struct platform_device *pdev,
| ^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:51:19: note: previous definition of 'rcar_cmm_setup' was here
51 | static inline int rcar_cmm_setup(struct platform_device *pdev,
| ^~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:121:5: error: redefinition of 'rcar_cmm_enable'
121 | int rcar_cmm_enable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:42:19: note: previous definition of 'rcar_cmm_enable' was here
42 | static inline int rcar_cmm_enable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:143:6: error: redefinition of 'rcar_cmm_disable'
143 | void rcar_cmm_disable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:47:20: note: previous definition of 'rcar_cmm_disable' was here
47 | static inline void rcar_cmm_disable(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rcar-du/rcar_cmm.c:161:5: error: redefinition of 'rcar_cmm_init'
161 | int rcar_cmm_init(struct platform_device *pdev)
| ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/rcar-du/rcar_cmm.c:16:
drivers/gpu/drm/rcar-du/rcar_cmm.h:37:19: note: previous definition of 'rcar_cmm_init' was here
37 | static inline int rcar_cmm_init(struct platform_device *pdev)
| ^~~~~~~~~~~~~
vim +/rcar_cmm_setup +81 drivers/gpu/drm/rcar-du/rcar_cmm.c
e08e934d6c289ed Jacopo Mondi 2019-10-17 64
e08e934d6c289ed Jacopo Mondi 2019-10-17 65 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 66 * rcar_cmm_setup() - Configure the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 67 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 68 * @config: The CMM unit configuration
e08e934d6c289ed Jacopo Mondi 2019-10-17 69 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 70 * Configure the CMM unit with the given configuration. Currently enabling,
e08e934d6c289ed Jacopo Mondi 2019-10-17 71 * disabling and programming of the 1-D LUT unit is supported.
e08e934d6c289ed Jacopo Mondi 2019-10-17 72 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 73 * As rcar_cmm_setup() accesses the CMM registers the unit should be powered
e08e934d6c289ed Jacopo Mondi 2019-10-17 74 * and its functional clock enabled. To guarantee this, before any call to
e08e934d6c289ed Jacopo Mondi 2019-10-17 75 * this function is made, the CMM unit has to be enabled by calling
e08e934d6c289ed Jacopo Mondi 2019-10-17 76 * rcar_cmm_enable() first.
e08e934d6c289ed Jacopo Mondi 2019-10-17 77 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 78 * TODO: Add support for LUT double buffer operations to avoid updating the
e08e934d6c289ed Jacopo Mondi 2019-10-17 79 * LUT table entries while a frame is being displayed.
e08e934d6c289ed Jacopo Mondi 2019-10-17 80 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @81 int rcar_cmm_setup(struct platform_device *pdev,
e08e934d6c289ed Jacopo Mondi 2019-10-17 82 const struct rcar_cmm_config *config)
e08e934d6c289ed Jacopo Mondi 2019-10-17 83 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 84 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 85
e08e934d6c289ed Jacopo Mondi 2019-10-17 86 /* Disable LUT if no table is provided. */
e08e934d6c289ed Jacopo Mondi 2019-10-17 87 if (!config->lut.table) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 88 if (rcmm->lut.enabled) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 89 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0);
e08e934d6c289ed Jacopo Mondi 2019-10-17 90 rcmm->lut.enabled = false;
e08e934d6c289ed Jacopo Mondi 2019-10-17 91 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 92
e08e934d6c289ed Jacopo Mondi 2019-10-17 93 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 94 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 95
e08e934d6c289ed Jacopo Mondi 2019-10-17 96 /* Enable LUT and program the new gamma table values. */
e08e934d6c289ed Jacopo Mondi 2019-10-17 97 if (!rcmm->lut.enabled) {
e08e934d6c289ed Jacopo Mondi 2019-10-17 98 rcar_cmm_write(rcmm, CM2_LUT_CTRL, CM2_LUT_CTRL_LUT_EN);
e08e934d6c289ed Jacopo Mondi 2019-10-17 99 rcmm->lut.enabled = true;
e08e934d6c289ed Jacopo Mondi 2019-10-17 100 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 101
e08e934d6c289ed Jacopo Mondi 2019-10-17 102 rcar_cmm_lut_write(rcmm, config->lut.table);
e08e934d6c289ed Jacopo Mondi 2019-10-17 103
e08e934d6c289ed Jacopo Mondi 2019-10-17 104 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 105 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 106 EXPORT_SYMBOL_GPL(rcar_cmm_setup);
e08e934d6c289ed Jacopo Mondi 2019-10-17 107
e08e934d6c289ed Jacopo Mondi 2019-10-17 108 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 109 * rcar_cmm_enable() - Enable the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 110 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 111 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 112 * When the output of the corresponding DU channel is routed to the CMM unit,
e08e934d6c289ed Jacopo Mondi 2019-10-17 113 * the unit shall be enabled before the DU channel is started, and remain
e08e934d6c289ed Jacopo Mondi 2019-10-17 114 * enabled until the channel is stopped. The CMM unit shall be disabled with
e08e934d6c289ed Jacopo Mondi 2019-10-17 115 * rcar_cmm_disable().
e08e934d6c289ed Jacopo Mondi 2019-10-17 116 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 117 * Calls to rcar_cmm_enable() and rcar_cmm_disable() are not reference-counted.
e08e934d6c289ed Jacopo Mondi 2019-10-17 118 * It is an error to attempt to enable an already enabled CMM unit, or to
e08e934d6c289ed Jacopo Mondi 2019-10-17 119 * attempt to disable a disabled unit.
e08e934d6c289ed Jacopo Mondi 2019-10-17 120 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @121 int rcar_cmm_enable(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 122 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 123 int ret;
e08e934d6c289ed Jacopo Mondi 2019-10-17 124
136ce7684bc1ff4 Qinglang Miao 2020-11-27 125 ret = pm_runtime_resume_and_get(&pdev->dev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 126 if (ret < 0)
e08e934d6c289ed Jacopo Mondi 2019-10-17 127 return ret;
e08e934d6c289ed Jacopo Mondi 2019-10-17 128
e08e934d6c289ed Jacopo Mondi 2019-10-17 129 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 130 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 131 EXPORT_SYMBOL_GPL(rcar_cmm_enable);
e08e934d6c289ed Jacopo Mondi 2019-10-17 132
e08e934d6c289ed Jacopo Mondi 2019-10-17 133 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 134 * rcar_cmm_disable() - Disable the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 135 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 136 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 137 * See rcar_cmm_enable() for usage information.
e08e934d6c289ed Jacopo Mondi 2019-10-17 138 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 139 * Disabling the CMM unit disable all the internal processing blocks. The CMM
e08e934d6c289ed Jacopo Mondi 2019-10-17 140 * state shall thus be restored with rcar_cmm_setup() when re-enabling the CMM
e08e934d6c289ed Jacopo Mondi 2019-10-17 141 * unit after the next rcar_cmm_enable() call.
e08e934d6c289ed Jacopo Mondi 2019-10-17 142 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @143 void rcar_cmm_disable(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 144 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 145 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 146
e08e934d6c289ed Jacopo Mondi 2019-10-17 147 rcar_cmm_write(rcmm, CM2_LUT_CTRL, 0);
e08e934d6c289ed Jacopo Mondi 2019-10-17 148 rcmm->lut.enabled = false;
e08e934d6c289ed Jacopo Mondi 2019-10-17 149
e08e934d6c289ed Jacopo Mondi 2019-10-17 150 pm_runtime_put(&pdev->dev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 151 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 152 EXPORT_SYMBOL_GPL(rcar_cmm_disable);
e08e934d6c289ed Jacopo Mondi 2019-10-17 153
e08e934d6c289ed Jacopo Mondi 2019-10-17 154 /*
e08e934d6c289ed Jacopo Mondi 2019-10-17 155 * rcar_cmm_init() - Initialize the CMM unit
e08e934d6c289ed Jacopo Mondi 2019-10-17 156 * @pdev: The platform device associated with the CMM instance
e08e934d6c289ed Jacopo Mondi 2019-10-17 157 *
e08e934d6c289ed Jacopo Mondi 2019-10-17 158 * Return: 0 on success, -EPROBE_DEFER if the CMM is not available yet,
e08e934d6c289ed Jacopo Mondi 2019-10-17 159 * -ENODEV if the DRM_RCAR_CMM config option is disabled
e08e934d6c289ed Jacopo Mondi 2019-10-17 160 */
e08e934d6c289ed Jacopo Mondi 2019-10-17 @161 int rcar_cmm_init(struct platform_device *pdev)
e08e934d6c289ed Jacopo Mondi 2019-10-17 162 {
e08e934d6c289ed Jacopo Mondi 2019-10-17 163 struct rcar_cmm *rcmm = platform_get_drvdata(pdev);
e08e934d6c289ed Jacopo Mondi 2019-10-17 164
e08e934d6c289ed Jacopo Mondi 2019-10-17 165 if (!rcmm)
e08e934d6c289ed Jacopo Mondi 2019-10-17 166 return -EPROBE_DEFER;
e08e934d6c289ed Jacopo Mondi 2019-10-17 167
e08e934d6c289ed Jacopo Mondi 2019-10-17 168 return 0;
e08e934d6c289ed Jacopo Mondi 2019-10-17 169 }
e08e934d6c289ed Jacopo Mondi 2019-10-17 170 EXPORT_SYMBOL_GPL(rcar_cmm_init);
e08e934d6c289ed Jacopo Mondi 2019-10-17 171
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 54032 bytes --]
next prev parent reply other threads:[~2021-07-28 19:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 8:42 [PATCH] drm: rcar-du: crtc: force depends on cmm Jackie Liu
2021-07-28 8:58 ` Kieran Bingham
2021-07-28 9:34 ` Jackie Liu
2021-07-28 10:46 ` Kieran Bingham
2021-07-28 10:55 ` Laurent Pinchart
2021-07-28 9:57 ` Jackie Liu
2021-07-28 11:09 ` Kieran Bingham
2021-07-28 11:30 ` Laurent Pinchart
2021-07-28 12:13 ` Kieran Bingham
2021-07-28 12:21 ` Jackie Liu
2021-07-28 12:24 ` Kieran Bingham
2021-07-28 12:28 ` Jackie Liu
2021-07-28 12:14 ` Jackie Liu
2021-07-28 19:34 ` kernel test robot [this message]
2021-07-28 19:34 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202107290329.PcxMAGh8-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=liu.yun@linux.dev \
--cc=liuyun01@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.