* [linux-next:master 10029/13260] drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
@ 2020-08-02 22:05 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-02 22:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 8857 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: caa966a7a6e57c61181e38de34d145df76a4f00b [10029/13260] drm/nouveau/kms/nv50-: convert core head_mode() to new push macros
config: i386-randconfig-s032-20200801 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout caa966a7a6e57c61181e38de34d145df76a4f00b
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:79:1: sparse: sparse: symbol 'headc57d_olut_clr' was not declared. Should it be static?
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:91:1: sparse: sparse: symbol 'headc57d_olut_set' was not declared. Should it be static?
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:161:1: sparse: sparse: symbol 'headc57d_olut' was not declared. Should it be static?
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:192:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:192:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:192:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:194:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:194:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:197:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:197:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
include/drm/drm_color_mgmt.h:48:28: sparse: sparse: shift count is negative (-1)
vim +/__iomem +187 drivers/gpu/drm/nouveau/dispnv50/headc57d.c
77
78 void
> 79 headc57d_olut_clr(struct nv50_head *head)
80 {
81 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
82 u32 *push;
83 if ((push = evo_wait(core, 2))) {
84 evo_mthd(push, 0x2288 + (head->base.index * 0x400), 1);
85 evo_data(push, 0x00000000);
86 evo_kick(push, core);
87 }
88 }
89
90 void
91 headc57d_olut_set(struct nv50_head *head, struct nv50_head_atom *asyh)
92 {
93 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
94 u32 *push;
95 if ((push = evo_wait(core, 4))) {
96 evo_mthd(push, 0x2280 + (head->base.index * 0x400), 4);
97 evo_data(push, asyh->olut.size << 8 |
98 asyh->olut.mode << 2 |
99 asyh->olut.output_mode);
100 evo_data(push, 0xffffffff); /* FP_NORM_SCALE. */
101 evo_data(push, asyh->olut.handle);
102 evo_data(push, asyh->olut.offset >> 8);
103 evo_kick(push, core);
104 }
105 }
106
107 static void
108 headc57d_olut_load_8(struct drm_color_lut *in, int size, void __iomem *mem)
109 {
110 memset_io(mem, 0x00, 0x20); /* VSS header. */
111 mem += 0x20;
112
113 while (size--) {
114 u16 r = drm_color_lut_extract(in-> red + 0, 16);
115 u16 g = drm_color_lut_extract(in->green + 0, 16);
116 u16 b = drm_color_lut_extract(in-> blue + 0, 16);
117 u16 ri = 0, gi = 0, bi = 0, i;
118
119 if (in++, size) {
120 ri = (drm_color_lut_extract(in-> red, 16) - r) / 4;
121 gi = (drm_color_lut_extract(in->green, 16) - g) / 4;
122 bi = (drm_color_lut_extract(in-> blue, 16) - b) / 4;
123 }
124
125 for (i = 0; i < 4; i++, mem += 8) {
126 writew(r + ri * i, mem + 0);
127 writew(g + gi * i, mem + 2);
128 writew(b + bi * i, mem + 4);
129 }
130 }
131
132 /* INTERPOLATE modes require a "next" entry to interpolate with,
133 * so we replicate the last entry to deal with this for now.
134 */
135 writew(readw(mem - 8), mem + 0);
136 writew(readw(mem - 6), mem + 2);
137 writew(readw(mem - 4), mem + 4);
138 }
139
140 static void
141 headc57d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem)
142 {
143 memset_io(mem, 0x00, 0x20); /* VSS header. */
144 mem += 0x20;
145
146 for (; size--; in++, mem += 0x08) {
147 writew(drm_color_lut_extract(in-> red, 16), mem + 0);
148 writew(drm_color_lut_extract(in->green, 16), mem + 2);
149 writew(drm_color_lut_extract(in-> blue, 16), mem + 4);
150 }
151
152 /* INTERPOLATE modes require a "next" entry to interpolate with,
153 * so we replicate the last entry to deal with this for now.
154 */
155 writew(readw(mem - 8), mem + 0);
156 writew(readw(mem - 6), mem + 2);
157 writew(readw(mem - 4), mem + 4);
158 }
159
160 bool
161 headc57d_olut(struct nv50_head *head, struct nv50_head_atom *asyh, int size)
162 {
163 if (size != 0 && size != 256 && size != 1024)
164 return false;
165
166 asyh->olut.mode = 2; /* DIRECT10 */
167 asyh->olut.size = 4 /* VSS header. */ + 1024 + 1 /* Entries. */;
168 asyh->olut.output_mode = 1; /* INTERPOLATE_ENABLE. */
169 if (size == 256)
170 asyh->olut.load = headc57d_olut_load_8;
171 else
172 asyh->olut.load = headc57d_olut_load;
173 return true;
174 }
175
176 static int
177 headc57d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
178 {
179 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
180 struct nv50_head_mode *m = &asyh->mode;
181 const int i = head->base.index;
182 int ret;
183
184 if ((ret = PUSH_WAIT(push, 13)))
185 return ret;
186
> 187 PUSH_NVSQ(push, NVC57D, 0x2064 + (i * 0x400), m->v.active << 16 | m->h.active,
188 0x2068 + (i * 0x400), m->v.synce << 16 | m->h.synce,
189 0x206c + (i * 0x400), m->v.blanke << 16 | m->h.blanke,
190 0x2070 + (i * 0x400), m->v.blanks << 16 | m->h.blanks,
191 0x2074 + (i * 0x400), m->v.blank2e << 16 | m->v.blank2s);
192 PUSH_NVSQ(push, NVC57D, 0x2008 + (i * 0x400), m->interlace,
193 0x200c + (i * 0x400), m->clock * 1000);
194 PUSH_NVSQ(push, NVC57D, 0x2028 + (i * 0x400), m->clock * 1000);
195
196 /*XXX: HEAD_USAGE_BOUNDS, doesn't belong here. */
197 PUSH_NVSQ(push, NVC57D, 0x2030 + (i * 0x400), 0x00001114);
198 return 0;
199 }
200
---
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: 45691 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-02 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-02 22:05 [linux-next:master 10029/13260] drivers/gpu/drm/nouveau/dispnv50/headc57d.c:187:9: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
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.