From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jimc:drm 1/2] drivers/gpu/drm/nouveau/dispnv50/crc.c:96:7: error: expected ')' before string constant
Date: Wed, 31 Mar 2021 22:14:02 +0800 [thread overview]
Message-ID: <202103312257.766LGwgO-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 21886 bytes --]
tree: https://github.com/jimc/linux.git drm
head: 201ff8b282e41e834720d44e0a0cb4fd561c4068
commit: 5707d45b8da16148287a63388ba2396eb972d013 [1/2] drm: RFC add choice to use dynamic debug in drm-debug
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.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/jimc/linux/commit/5707d45b8da16148287a63388ba2396eb972d013
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc drm
git checkout 5707d45b8da16148287a63388ba2396eb972d013
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 >>):
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/i2c.h:13,
from include/drm/drm_crtc.h:28,
from drivers/gpu/drm/nouveau/dispnv50/crc.c:3:
drivers/gpu/drm/nouveau/dispnv50/crc.c: In function 'nv50_crc_ctx_flip_work':
>> drivers/gpu/drm/nouveau/dispnv50/crc.c:96:7: error: expected ')' before string constant
96 | "Lock contended, delaying CRC ctx flip for head-%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:13: note: to match this '('
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:13: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:13: note: (near initialization for '__UNIQUE_ID_ddebug379.format')
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/dispnv50/crc.c:96:7: error: expected ')' before string constant
96 | "Lock contended, delaying CRC ctx flip for head-%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/drm/drm_print.h:447:19: warning: passing argument 3 of '__dynamic_dev_dbg' makes pointer from integer without a cast [-Wint-conversion]
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~
| |
| int
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:95:3: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
95 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:69:22: note: expected 'const char *' but argument is of type 'int'
69 | const char *fmt, ...);
| ~~~~~~~~~~~~^~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:105:6: error: expected ')' before string constant
105 | "Flipping notifier ctx for head %d (%d -> %d)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/gpu/drm/nouveau/dispnv50/crc.c:104:2: note: in expansion of macro 'DRM_DEV_DEBUG_KMS'
104 | DRM_DEV_DEBUG_KMS(crtc->dev->dev,
| ^~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:91:13: note: to match this '('
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/drm/drm_print.h:352:2: note: in expansion of macro 'dev_dbg'
352 | dev_dbg(dev, cls fmt, ##__VA_ARGS__)
| ^~~~~~~
include/drm/drm_print.h:447:2: note: in expansion of macro 'drm_dev_dbg'
447 | drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
vim +96 drivers/gpu/drm/nouveau/dispnv50/crc.c
12885ecbfe62df4 Lyude Paul 2019-10-07 @3 #include <drm/drm_crtc.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 4 #include <drm/drm_atomic_helper.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 5 #include <drm/drm_vblank.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 6 #include <drm/drm_vblank_work.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 7
12885ecbfe62df4 Lyude Paul 2019-10-07 8 #include <nvif/class.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 9 #include <nvif/cl0002.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 10 #include <nvif/timer.h>
12885ecbfe62df4 Lyude Paul 2019-10-07 11
c854bf9464500d1 Ben Skeggs 2020-06-21 12 #include <nvhw/class/cl907d.h>
c854bf9464500d1 Ben Skeggs 2020-06-21 13
12885ecbfe62df4 Lyude Paul 2019-10-07 14 #include "nouveau_drv.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 15 #include "core.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 16 #include "head.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 17 #include "wndw.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 18 #include "handles.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 19 #include "crc.h"
12885ecbfe62df4 Lyude Paul 2019-10-07 20
12885ecbfe62df4 Lyude Paul 2019-10-07 21 static const char * const nv50_crc_sources[] = {
12885ecbfe62df4 Lyude Paul 2019-10-07 22 [NV50_CRC_SOURCE_NONE] = "none",
12885ecbfe62df4 Lyude Paul 2019-10-07 23 [NV50_CRC_SOURCE_AUTO] = "auto",
12885ecbfe62df4 Lyude Paul 2019-10-07 24 [NV50_CRC_SOURCE_RG] = "rg",
12885ecbfe62df4 Lyude Paul 2019-10-07 25 [NV50_CRC_SOURCE_OUTP_ACTIVE] = "outp-active",
12885ecbfe62df4 Lyude Paul 2019-10-07 26 [NV50_CRC_SOURCE_OUTP_COMPLETE] = "outp-complete",
12885ecbfe62df4 Lyude Paul 2019-10-07 27 [NV50_CRC_SOURCE_OUTP_INACTIVE] = "outp-inactive",
12885ecbfe62df4 Lyude Paul 2019-10-07 28 };
12885ecbfe62df4 Lyude Paul 2019-10-07 29
12885ecbfe62df4 Lyude Paul 2019-10-07 30 static int nv50_crc_parse_source(const char *buf, enum nv50_crc_source *s)
12885ecbfe62df4 Lyude Paul 2019-10-07 31 {
12885ecbfe62df4 Lyude Paul 2019-10-07 32 int i;
12885ecbfe62df4 Lyude Paul 2019-10-07 33
12885ecbfe62df4 Lyude Paul 2019-10-07 34 if (!buf) {
12885ecbfe62df4 Lyude Paul 2019-10-07 35 *s = NV50_CRC_SOURCE_NONE;
12885ecbfe62df4 Lyude Paul 2019-10-07 36 return 0;
12885ecbfe62df4 Lyude Paul 2019-10-07 37 }
12885ecbfe62df4 Lyude Paul 2019-10-07 38
12885ecbfe62df4 Lyude Paul 2019-10-07 39 i = match_string(nv50_crc_sources, ARRAY_SIZE(nv50_crc_sources), buf);
12885ecbfe62df4 Lyude Paul 2019-10-07 40 if (i < 0)
12885ecbfe62df4 Lyude Paul 2019-10-07 41 return i;
12885ecbfe62df4 Lyude Paul 2019-10-07 42
12885ecbfe62df4 Lyude Paul 2019-10-07 43 *s = i;
12885ecbfe62df4 Lyude Paul 2019-10-07 44 return 0;
12885ecbfe62df4 Lyude Paul 2019-10-07 45 }
12885ecbfe62df4 Lyude Paul 2019-10-07 46
12885ecbfe62df4 Lyude Paul 2019-10-07 47 int
12885ecbfe62df4 Lyude Paul 2019-10-07 48 nv50_crc_verify_source(struct drm_crtc *crtc, const char *source_name,
12885ecbfe62df4 Lyude Paul 2019-10-07 49 size_t *values_cnt)
12885ecbfe62df4 Lyude Paul 2019-10-07 50 {
12885ecbfe62df4 Lyude Paul 2019-10-07 51 struct nouveau_drm *drm = nouveau_drm(crtc->dev);
12885ecbfe62df4 Lyude Paul 2019-10-07 52 enum nv50_crc_source source;
12885ecbfe62df4 Lyude Paul 2019-10-07 53
12885ecbfe62df4 Lyude Paul 2019-10-07 54 if (nv50_crc_parse_source(source_name, &source) < 0) {
12885ecbfe62df4 Lyude Paul 2019-10-07 55 NV_DEBUG(drm, "unknown source %s\n", source_name);
12885ecbfe62df4 Lyude Paul 2019-10-07 56 return -EINVAL;
12885ecbfe62df4 Lyude Paul 2019-10-07 57 }
12885ecbfe62df4 Lyude Paul 2019-10-07 58
12885ecbfe62df4 Lyude Paul 2019-10-07 59 *values_cnt = 1;
12885ecbfe62df4 Lyude Paul 2019-10-07 60 return 0;
12885ecbfe62df4 Lyude Paul 2019-10-07 61 }
12885ecbfe62df4 Lyude Paul 2019-10-07 62
12885ecbfe62df4 Lyude Paul 2019-10-07 63 const char *const *nv50_crc_get_sources(struct drm_crtc *crtc, size_t *count)
12885ecbfe62df4 Lyude Paul 2019-10-07 64 {
12885ecbfe62df4 Lyude Paul 2019-10-07 65 *count = ARRAY_SIZE(nv50_crc_sources);
12885ecbfe62df4 Lyude Paul 2019-10-07 66 return nv50_crc_sources;
12885ecbfe62df4 Lyude Paul 2019-10-07 67 }
12885ecbfe62df4 Lyude Paul 2019-10-07 68
12885ecbfe62df4 Lyude Paul 2019-10-07 69 static void
12885ecbfe62df4 Lyude Paul 2019-10-07 70 nv50_crc_program_ctx(struct nv50_head *head,
12885ecbfe62df4 Lyude Paul 2019-10-07 71 struct nv50_crc_notifier_ctx *ctx)
12885ecbfe62df4 Lyude Paul 2019-10-07 72 {
12885ecbfe62df4 Lyude Paul 2019-10-07 73 struct nv50_disp *disp = nv50_disp(head->base.base.dev);
12885ecbfe62df4 Lyude Paul 2019-10-07 74 struct nv50_core *core = disp->core;
12885ecbfe62df4 Lyude Paul 2019-10-07 75 u32 interlock[NV50_DISP_INTERLOCK__SIZE] = { 0 };
12885ecbfe62df4 Lyude Paul 2019-10-07 76
12885ecbfe62df4 Lyude Paul 2019-10-07 77 core->func->crc->set_ctx(head, ctx);
12885ecbfe62df4 Lyude Paul 2019-10-07 78 core->func->update(core, interlock, false);
12885ecbfe62df4 Lyude Paul 2019-10-07 79 }
12885ecbfe62df4 Lyude Paul 2019-10-07 80
12885ecbfe62df4 Lyude Paul 2019-10-07 81 static void nv50_crc_ctx_flip_work(struct kthread_work *base)
12885ecbfe62df4 Lyude Paul 2019-10-07 82 {
12885ecbfe62df4 Lyude Paul 2019-10-07 83 struct drm_vblank_work *work = to_drm_vblank_work(base);
12885ecbfe62df4 Lyude Paul 2019-10-07 84 struct nv50_crc *crc = container_of(work, struct nv50_crc, flip_work);
12885ecbfe62df4 Lyude Paul 2019-10-07 85 struct nv50_head *head = container_of(crc, struct nv50_head, crc);
12885ecbfe62df4 Lyude Paul 2019-10-07 86 struct drm_crtc *crtc = &head->base.base;
12885ecbfe62df4 Lyude Paul 2019-10-07 87 struct nv50_disp *disp = nv50_disp(crtc->dev);
12885ecbfe62df4 Lyude Paul 2019-10-07 88 u8 new_idx = crc->ctx_idx ^ 1;
12885ecbfe62df4 Lyude Paul 2019-10-07 89
12885ecbfe62df4 Lyude Paul 2019-10-07 90 /*
12885ecbfe62df4 Lyude Paul 2019-10-07 91 * We don't want to accidentally wait for longer then the vblank, so
12885ecbfe62df4 Lyude Paul 2019-10-07 92 * try again for the next vblank if we don't grab the lock
12885ecbfe62df4 Lyude Paul 2019-10-07 93 */
12885ecbfe62df4 Lyude Paul 2019-10-07 94 if (!mutex_trylock(&disp->mutex)) {
12885ecbfe62df4 Lyude Paul 2019-10-07 95 DRM_DEV_DEBUG_KMS(crtc->dev->dev,
12885ecbfe62df4 Lyude Paul 2019-10-07 @96 "Lock contended, delaying CRC ctx flip for head-%d\n",
12885ecbfe62df4 Lyude Paul 2019-10-07 97 head->base.index);
12885ecbfe62df4 Lyude Paul 2019-10-07 98 drm_vblank_work_schedule(work,
12885ecbfe62df4 Lyude Paul 2019-10-07 99 drm_crtc_vblank_count(crtc) + 1,
12885ecbfe62df4 Lyude Paul 2019-10-07 100 true);
12885ecbfe62df4 Lyude Paul 2019-10-07 101 return;
12885ecbfe62df4 Lyude Paul 2019-10-07 102 }
12885ecbfe62df4 Lyude Paul 2019-10-07 103
12885ecbfe62df4 Lyude Paul 2019-10-07 104 DRM_DEV_DEBUG_KMS(crtc->dev->dev,
12885ecbfe62df4 Lyude Paul 2019-10-07 105 "Flipping notifier ctx for head %d (%d -> %d)\n",
12885ecbfe62df4 Lyude Paul 2019-10-07 106 drm_crtc_index(crtc), crc->ctx_idx, new_idx);
12885ecbfe62df4 Lyude Paul 2019-10-07 107
12885ecbfe62df4 Lyude Paul 2019-10-07 108 nv50_crc_program_ctx(head, NULL);
12885ecbfe62df4 Lyude Paul 2019-10-07 109 nv50_crc_program_ctx(head, &crc->ctx[new_idx]);
12885ecbfe62df4 Lyude Paul 2019-10-07 110 mutex_unlock(&disp->mutex);
12885ecbfe62df4 Lyude Paul 2019-10-07 111
12885ecbfe62df4 Lyude Paul 2019-10-07 112 spin_lock_irq(&crc->lock);
12885ecbfe62df4 Lyude Paul 2019-10-07 113 crc->ctx_changed = true;
12885ecbfe62df4 Lyude Paul 2019-10-07 114 spin_unlock_irq(&crc->lock);
12885ecbfe62df4 Lyude Paul 2019-10-07 115 }
12885ecbfe62df4 Lyude Paul 2019-10-07 116
:::::: The code at line 96 was first introduced by commit
:::::: 12885ecbfe62df4358d452080d3b8feef54ec8cb drm/nouveau/kms/nvd9-: Add CRC support
:::::: TO: Lyude Paul <lyude@redhat.com>
:::::: CC: Lyude Paul <lyude@redhat.com>
---
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: 68036 bytes --]
reply other threads:[~2021-03-31 14:14 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=202103312257.766LGwgO-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.