From: kernel test robot <lkp@intel.com>
To: Samuel Holland <samuel@sholland.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Maxime Ripard <maxime@cerno.tech>
Subject: [linux-next:master 6482/7265] drivers/gpu/drm/sun4i/sun4i_frontend.c:225:18: error: 'PHYS_OFFSET' undeclared; did you mean 'PAGE_OFFSET'?
Date: Thu, 28 Apr 2022 00:06:21 +0800 [thread overview]
Message-ID: <202204280029.yAaWEvM8-lkp@intel.com> (raw)
Hi Samuel,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f02ac5c95dfd45d2f50ecc68d79177de326c668c
commit: 7d57f7f7975634a7a6c5b5adcfe70450426a830b [6482/7265] drm/sun4i: Allow building the driver on RISC-V
config: m68k-randconfig-r002-20220427 (https://download.01.org/0day-ci/archive/20220428/202204280029.yAaWEvM8-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7d57f7f7975634a7a6c5b5adcfe70450426a830b
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 7d57f7f7975634a7a6c5b5adcfe70450426a830b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/gpu/drm/sun4i/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the linux-next/master HEAD f02ac5c95dfd45d2f50ecc68d79177de326c668c builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
drivers/gpu/drm/sun4i/sun4i_frontend.c: In function 'sun4i_frontend_update_buffer':
>> drivers/gpu/drm/sun4i/sun4i_frontend.c:225:18: error: 'PHYS_OFFSET' undeclared (first use in this function); did you mean 'PAGE_OFFSET'?
225 | paddr -= PHYS_OFFSET;
| ^~~~~~~~~~~
| PAGE_OFFSET
drivers/gpu/drm/sun4i/sun4i_frontend.c:225:18: note: each undeclared identifier is reported only once for each function it appears in
vim +225 drivers/gpu/drm/sun4i/sun4i_frontend.c
8a813e401fcd41 Paul Kocialkowski 2019-01-18 155
dd0421f47505bb Maxime Ripard 2018-01-22 156 void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend,
dd0421f47505bb Maxime Ripard 2018-01-22 157 struct drm_plane *plane)
dd0421f47505bb Maxime Ripard 2018-01-22 158 {
dd0421f47505bb Maxime Ripard 2018-01-22 159 struct drm_plane_state *state = plane->state;
dd0421f47505bb Maxime Ripard 2018-01-22 160 struct drm_framebuffer *fb = state->fb;
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 161 unsigned int strides[3] = {};
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 162
dd0421f47505bb Maxime Ripard 2018-01-22 163 dma_addr_t paddr;
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 164 bool swap;
dd0421f47505bb Maxime Ripard 2018-01-22 165
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 166 if (fb->modifier == DRM_FORMAT_MOD_ALLWINNER_TILED) {
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 167 unsigned int width = state->src_w >> 16;
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 168 unsigned int offset;
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 169
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 170 strides[0] = SUN4I_FRONTEND_LINESTRD_TILED(fb->pitches[0]);
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 171
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 172 /*
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 173 * The X1 offset is the offset to the bottom-right point in the
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 174 * end tile, which is the final pixel (at offset width - 1)
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 175 * within the end tile (with a 32-byte mask).
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 176 */
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 177 offset = (width - 1) & (32 - 1);
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 178
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 179 regmap_write(frontend->regs, SUN4I_FRONTEND_TB_OFF0_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 180 SUN4I_FRONTEND_TB_OFF_X1(offset));
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 181
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 182 if (fb->format->num_planes > 1) {
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 183 strides[1] =
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 184 SUN4I_FRONTEND_LINESTRD_TILED(fb->pitches[1]);
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 185
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 186 regmap_write(frontend->regs, SUN4I_FRONTEND_TB_OFF1_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 187 SUN4I_FRONTEND_TB_OFF_X1(offset));
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 188 }
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 189
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 190 if (fb->format->num_planes > 2) {
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 191 strides[2] =
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 192 SUN4I_FRONTEND_LINESTRD_TILED(fb->pitches[2]);
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 193
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 194 regmap_write(frontend->regs, SUN4I_FRONTEND_TB_OFF2_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 195 SUN4I_FRONTEND_TB_OFF_X1(offset));
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 196 }
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 197 } else {
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 198 strides[0] = fb->pitches[0];
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 199
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 200 if (fb->format->num_planes > 1)
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 201 strides[1] = fb->pitches[1];
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 202
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 203 if (fb->format->num_planes > 2)
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 204 strides[2] = fb->pitches[2];
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 205 }
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 206
dd0421f47505bb Maxime Ripard 2018-01-22 207 /* Set the line width */
dd0421f47505bb Maxime Ripard 2018-01-22 208 DRM_DEBUG_DRIVER("Frontend stride: %d bytes\n", fb->pitches[0]);
dd0421f47505bb Maxime Ripard 2018-01-22 209 regmap_write(frontend->regs, SUN4I_FRONTEND_LINESTRD0_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 210 strides[0]);
dd0421f47505bb Maxime Ripard 2018-01-22 211
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 212 if (fb->format->num_planes > 1)
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 213 regmap_write(frontend->regs, SUN4I_FRONTEND_LINESTRD1_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 214 strides[1]);
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 215
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 216 if (fb->format->num_planes > 2)
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 217 regmap_write(frontend->regs, SUN4I_FRONTEND_LINESTRD2_REG,
9042e3fb7e22d0 Paul Kocialkowski 2019-01-18 218 strides[2]);
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 219
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 220 /* Some planar formats require chroma channel swapping by hand. */
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 221 swap = sun4i_frontend_format_chroma_requires_swap(fb->format->format);
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 222
dd0421f47505bb Maxime Ripard 2018-01-22 223 /* Set the physical address of the buffer in memory */
dd0421f47505bb Maxime Ripard 2018-01-22 224 paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
dd0421f47505bb Maxime Ripard 2018-01-22 @225 paddr -= PHYS_OFFSET;
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 226 DRM_DEBUG_DRIVER("Setting buffer #0 address to %pad\n", &paddr);
dd0421f47505bb Maxime Ripard 2018-01-22 227 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR0_REG, paddr);
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 228
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 229 if (fb->format->num_planes > 1) {
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 230 paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 2 : 1);
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 231 paddr -= PHYS_OFFSET;
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 232 DRM_DEBUG_DRIVER("Setting buffer #1 address to %pad\n", &paddr);
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 233 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR1_REG,
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 234 paddr);
9afe52d54bb0d7 Paul Kocialkowski 2019-01-18 235 }
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 236
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 237 if (fb->format->num_planes > 2) {
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 238 paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 1 : 2);
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 239 paddr -= PHYS_OFFSET;
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 240 DRM_DEBUG_DRIVER("Setting buffer #2 address to %pad\n", &paddr);
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 241 regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR2_REG,
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 242 paddr);
8c8152bf4db6ce Paul Kocialkowski 2019-01-18 243 }
dd0421f47505bb Maxime Ripard 2018-01-22 244 }
dd0421f47505bb Maxime Ripard 2018-01-22 245 EXPORT_SYMBOL(sun4i_frontend_update_buffer);
dd0421f47505bb Maxime Ripard 2018-01-22 246
:::::: The code at line 225 was first introduced by commit
:::::: dd0421f47505bbbe30a4ce37b51a5c127b8754dc drm/sun4i: Add a driver for the display frontend
:::::: TO: Maxime Ripard <maxime.ripard@free-electrons.com>
:::::: CC: Maxime Ripard <maxime.ripard@free-electrons.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-27 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202204280029.yAaWEvM8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=maxime@cerno.tech \
--cc=samuel@sholland.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