From: kernel test robot <lkp@intel.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
chunkuang.hu@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, p.zabel@pengutronix.de,
airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, wenst@chromium.org,
kernel@collabora.com
Subject: Re: [PATCH v3 04/11] drm/mediatek: gamma: Improve and simplify HW LUT calculation
Date: Sat, 6 May 2023 23:19:02 +0800 [thread overview]
Message-ID: <202305062349.SFNFiiWv-lkp@intel.com> (raw)
In-Reply-To: <20230506123549.101727-5-angelogioacchino.delregno@collabora.com>
Hi AngeloGioacchino,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[cannot apply to pza/imx-drm/next mbgg-mediatek/for-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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/drm-mediatek-gamma-Adjust-mtk_drm_gamma_set_common-parameters/20230506-203713
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20230506123549.101727-5-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v3 04/11] drm/mediatek: gamma: Improve and simplify HW LUT calculation
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20230506/202305062349.SFNFiiWv-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/a933258d0ee5c49d54f70fe11d3b1d719d5b6087
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review AngeloGioacchino-Del-Regno/drm-mediatek-gamma-Adjust-mtk_drm_gamma_set_common-parameters/20230506-203713
git checkout a933258d0ee5c49d54f70fe11d3b1d719d5b6087
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/mediatek/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305062349.SFNFiiWv-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/mediatek/mtk_disp_gamma.c: In function 'mtk_gamma_set_common':
>> drivers/gpu/drm/mediatek/mtk_disp_gamma.c:106:48: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
106 | word = hwlut.red << 20 +
| ~~~^
107 | hwlut.green << 10 +
| ~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_disp_gamma.c:107:50: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
107 | hwlut.green << 10 +
| ~~~^
108 | hwlut.red;
| ~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_disp_gamma.c:119:48: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
119 | word = diff.blue << 20 +
| ~~~^
120 | diff.green << 10 +
| ~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_disp_gamma.c:120:49: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
120 | diff.green << 10 +
| ~~~^
121 | diff.red;
| ~~~~~~~~
vim +106 drivers/gpu/drm/mediatek/mtk_disp_gamma.c
70
71 void mtk_gamma_set_common(struct device *dev, void __iomem *regs, struct drm_crtc_state *state)
72 {
73 struct mtk_disp_gamma *gamma = dev_get_drvdata(dev);
74 unsigned int i, reg;
75 struct drm_color_lut *lut;
76 void __iomem *lut_base;
77 bool lut_diff;
78 u16 lut_size;
79 u32 word;
80
81 /* If there's no gamma lut there's nothing to do here. */
82 if (!state->gamma_lut)
83 return;
84
85 if (gamma && gamma->data) {
86 lut_diff = gamma->data->lut_diff;
87 lut_size = gamma->data->lut_size;
88 } else {
89 lut_diff = false;
90 lut_size = LUT_SIZE_DEFAULT;
91 }
92
93 reg = readl(regs + DISP_GAMMA_CFG);
94 reg = reg | GAMMA_LUT_EN;
95 writel(reg, regs + DISP_GAMMA_CFG);
96 lut_base = regs + DISP_GAMMA_LUT;
97 lut = (struct drm_color_lut *)state->gamma_lut->data;
98 for (i = 0; i < lut_size; i++) {
99 struct drm_color_lut diff, hwlut;
100
101 hwlut.red = drm_color_lut_extract(lut[i].red, 10);
102 hwlut.green = drm_color_lut_extract(lut[i].green, 10);
103 hwlut.blue = drm_color_lut_extract(lut[i].blue, 10);
104
105 if (!lut_diff || (i % 2 == 0)) {
> 106 word = hwlut.red << 20 +
107 hwlut.green << 10 +
108 hwlut.red;
109 } else {
110 diff.red = lut[i].red - lut[i - 1].red;
111 diff.red = drm_color_lut_extract(diff.red, 10);
112
113 diff.green = lut[i].green - lut[i - 1].green;
114 diff.green = drm_color_lut_extract(diff.green, 10);
115
116 diff.blue = lut[i].blue - lut[i - 1].blue;
117 diff.blue = drm_color_lut_extract(diff.blue, 10);
118
119 word = diff.blue << 20 +
120 diff.green << 10 +
121 diff.red;
122 }
123 writel(word, (lut_base + i * 4));
124 }
125 }
126
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-05-06 15:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 12:35 [PATCH v3 00/11] MediaTek DDP GAMMA - 12-bit LUT support AngeloGioacchino Del Regno
2023-05-06 12:35 ` [PATCH v3 01/11] drm/mediatek: gamma: Adjust mtk_drm_gamma_set_common parameters AngeloGioacchino Del Regno
2023-05-06 12:35 ` [PATCH v3 02/11] drm/mediatek: gamma: Reduce indentation in mtk_gamma_set_common() AngeloGioacchino Del Regno
2023-05-09 14:38 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 03/11] drm/mediatek: gamma: Support SoC specific LUT size AngeloGioacchino Del Regno
2023-05-06 12:35 ` [PATCH v3 04/11] drm/mediatek: gamma: Improve and simplify HW LUT calculation AngeloGioacchino Del Regno
2023-05-06 15:19 ` kernel test robot [this message]
2023-05-06 12:35 ` [PATCH v3 05/11] drm/mediatek: gamma: Enable the Gamma LUT table only after programming AngeloGioacchino Del Regno
2023-05-09 14:39 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 06/11] drm/mediatek: gamma: Use bitfield macros AngeloGioacchino Del Regno
2023-05-09 14:40 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 07/11] drm/mediatek: gamma: Support specifying number of bits per LUT component AngeloGioacchino Del Regno
2023-05-09 14:41 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 08/11] drm/mediatek: gamma: Support multi-bank gamma LUT AngeloGioacchino Del Regno
2023-05-06 12:35 ` [PATCH v3 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195 AngeloGioacchino Del Regno
2023-05-09 14:43 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 10/11] drm/mediatek: gamma: Make sure relay mode is disabled AngeloGioacchino Del Regno
2023-05-09 14:44 ` Jason-JH Lin (林睿祥)
2023-05-06 12:35 ` [PATCH v3 11/11] drm/mediatek: gamma: Program gamma LUT type for descending or rising AngeloGioacchino Del Regno
2023-05-09 14:53 ` Jason-JH Lin (林睿祥)
2023-05-09 14:35 ` [PATCH v3 00/11] MediaTek DDP GAMMA - 12-bit LUT support Jason-JH Lin (林睿祥)
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=202305062349.SFNFiiWv-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=wenst@chromium.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox