Message ID | 1552665027-16457-1-git-send-email-ayan.halder@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/selftest:- Adding a new format(whose cpp=0) to be tested by igt_check_drm_format_min_pitch | expand |
Hi Ayan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.0 next-20190306] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ayan-Halder/drm-selftest-Adding-a-new-format-whose-cpp-0-to-be-tested-by-igt_check_drm_format_min_pitch/20190316-050437 config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=xtensa All errors (new ones prefixed by >>): drivers/gpu//drm/selftests/test-drm_format.c: In function 'igt_check_drm_format_min_pitch': >> drivers/gpu//drm/selftests/test-drm_format.c:280:25: error: 'DRM_FORMAT_VUY101010' undeclared (first use in this function); did you mean 'DRM_FORMAT_BGRA1010102'? info = drm_format_info(DRM_FORMAT_VUY101010); ^~~~~~~~~~~~~~~~~~~~ DRM_FORMAT_BGRA1010102 drivers/gpu//drm/selftests/test-drm_format.c:280:25: note: each undeclared identifier is reported only once for each function it appears in vim +280 drivers/gpu//drm/selftests/test-drm_format.c 100 101 int igt_check_drm_format_min_pitch(void *ignored) 102 { 103 const struct drm_format_info *info = NULL; 104 105 /* Test invalid arguments */ 106 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 107 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 108 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 109 110 /* Test 1 plane 8 bits per pixel format */ 111 info = drm_format_info(DRM_FORMAT_RGB332); 112 FAIL_ON(!info); 113 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 114 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 115 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 116 117 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 118 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 119 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 120 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 121 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 122 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 123 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 124 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 125 (uint64_t)UINT_MAX); 126 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 127 (uint64_t)(UINT_MAX - 1)); 128 129 /* Test 1 plane 16 bits per pixel format */ 130 info = drm_format_info(DRM_FORMAT_XRGB4444); 131 FAIL_ON(!info); 132 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 133 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 134 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 135 136 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 2); 137 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 4); 138 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1280); 139 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 2048); 140 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 3840); 141 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 8192); 142 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 1342); 143 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 144 (uint64_t)UINT_MAX * 2); 145 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 146 (uint64_t)(UINT_MAX - 1) * 2); 147 148 /* Test 1 plane 24 bits per pixel format */ 149 info = drm_format_info(DRM_FORMAT_RGB888); 150 FAIL_ON(!info); 151 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 152 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 153 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 154 155 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 3); 156 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 6); 157 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1920); 158 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 3072); 159 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 5760); 160 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 12288); 161 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 2013); 162 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 163 (uint64_t)UINT_MAX * 3); 164 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 165 (uint64_t)(UINT_MAX - 1) * 3); 166 167 /* Test 1 plane 32 bits per pixel format */ 168 info = drm_format_info(DRM_FORMAT_ABGR8888); 169 FAIL_ON(!info); 170 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 171 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 172 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 173 174 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 4); 175 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 8); 176 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 2560); 177 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 4096); 178 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 7680); 179 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 16384); 180 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 2684); 181 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 182 (uint64_t)UINT_MAX * 4); 183 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 184 (uint64_t)(UINT_MAX - 1) * 4); 185 186 /* Test 2 planes format */ 187 info = drm_format_info(DRM_FORMAT_NV12); 188 FAIL_ON(!info); 189 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 190 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 191 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 192 FAIL_ON(drm_format_info_min_pitch(info, 2, 0) != 0); 193 194 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 195 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 2); 196 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 197 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 2); 198 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 199 FAIL_ON(drm_format_info_min_pitch(info, 1, 320) != 640); 200 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 201 FAIL_ON(drm_format_info_min_pitch(info, 1, 512) != 1024); 202 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 203 FAIL_ON(drm_format_info_min_pitch(info, 1, 960) != 1920); 204 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 205 FAIL_ON(drm_format_info_min_pitch(info, 1, 2048) != 4096); 206 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 207 FAIL_ON(drm_format_info_min_pitch(info, 1, 336) != 672); 208 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 209 (uint64_t)UINT_MAX); 210 FAIL_ON(drm_format_info_min_pitch(info, 1, UINT_MAX / 2 + 1) != 211 (uint64_t)UINT_MAX + 1); 212 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 213 (uint64_t)(UINT_MAX - 1)); 214 FAIL_ON(drm_format_info_min_pitch(info, 1, (UINT_MAX - 1) / 2) != 215 (uint64_t)(UINT_MAX - 1)); 216 217 /* Test 3 planes 8 bits per pixel format */ 218 info = drm_format_info(DRM_FORMAT_YUV422); 219 FAIL_ON(!info); 220 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 221 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 222 FAIL_ON(drm_format_info_min_pitch(info, 2, 0) != 0); 223 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 224 FAIL_ON(drm_format_info_min_pitch(info, 3, 0) != 0); 225 226 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 227 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 1); 228 FAIL_ON(drm_format_info_min_pitch(info, 2, 1) != 1); 229 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 230 FAIL_ON(drm_format_info_min_pitch(info, 1, 2) != 2); 231 FAIL_ON(drm_format_info_min_pitch(info, 2, 2) != 2); 232 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 233 FAIL_ON(drm_format_info_min_pitch(info, 1, 320) != 320); 234 FAIL_ON(drm_format_info_min_pitch(info, 2, 320) != 320); 235 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 236 FAIL_ON(drm_format_info_min_pitch(info, 1, 512) != 512); 237 FAIL_ON(drm_format_info_min_pitch(info, 2, 512) != 512); 238 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 239 FAIL_ON(drm_format_info_min_pitch(info, 1, 960) != 960); 240 FAIL_ON(drm_format_info_min_pitch(info, 2, 960) != 960); 241 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 242 FAIL_ON(drm_format_info_min_pitch(info, 1, 2048) != 2048); 243 FAIL_ON(drm_format_info_min_pitch(info, 2, 2048) != 2048); 244 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 245 FAIL_ON(drm_format_info_min_pitch(info, 1, 336) != 336); 246 FAIL_ON(drm_format_info_min_pitch(info, 2, 336) != 336); 247 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 248 (uint64_t)UINT_MAX); 249 FAIL_ON(drm_format_info_min_pitch(info, 1, UINT_MAX / 2 + 1) != 250 (uint64_t)UINT_MAX / 2 + 1); 251 FAIL_ON(drm_format_info_min_pitch(info, 2, UINT_MAX / 2 + 1) != 252 (uint64_t)UINT_MAX / 2 + 1); 253 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1) / 2) != 254 (uint64_t)(UINT_MAX - 1) / 2); 255 FAIL_ON(drm_format_info_min_pitch(info, 1, (UINT_MAX - 1) / 2) != 256 (uint64_t)(UINT_MAX - 1) / 2); 257 FAIL_ON(drm_format_info_min_pitch(info, 2, (UINT_MAX - 1) / 2) != 258 (uint64_t)(UINT_MAX - 1) / 2); 259 260 /* Test tiled format */ 261 info = drm_format_info(DRM_FORMAT_X0L2); 262 FAIL_ON(!info); 263 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 264 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 265 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 266 267 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 2); 268 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 4); 269 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1280); 270 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 2048); 271 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 3840); 272 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 8192); 273 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 1342); 274 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 275 (uint64_t)UINT_MAX * 2); 276 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 277 (uint64_t)(UINT_MAX - 1) * 2); 278 279 /* Test format with cpp/char_per_block 0 */ > 280 info = drm_format_info(DRM_FORMAT_VUY101010); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Ayan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.0 next-20190306] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ayan-Halder/drm-selftest-Adding-a-new-format-whose-cpp-0-to-be-tested-by-igt_check_drm_format_min_pitch/20190316-050437 config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/gpu//drm/selftests/test-drm_format.c: In function 'igt_check_drm_format_min_pitch': >> drivers/gpu//drm/selftests/test-drm_format.c:280:25: error: 'DRM_FORMAT_VUY101010' undeclared (first use in this function); did you mean 'DRM_FORMAT_ARGB2101010'? info = drm_format_info(DRM_FORMAT_VUY101010); ^~~~~~~~~~~~~~~~~~~~ DRM_FORMAT_ARGB2101010 drivers/gpu//drm/selftests/test-drm_format.c:280:25: note: each undeclared identifier is reported only once for each function it appears in vim +280 drivers/gpu//drm/selftests/test-drm_format.c 100 101 int igt_check_drm_format_min_pitch(void *ignored) 102 { 103 const struct drm_format_info *info = NULL; 104 105 /* Test invalid arguments */ 106 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 107 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 108 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 109 110 /* Test 1 plane 8 bits per pixel format */ 111 info = drm_format_info(DRM_FORMAT_RGB332); 112 FAIL_ON(!info); 113 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 114 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 115 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 116 117 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 118 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 119 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 120 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 121 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 122 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 123 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 124 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 125 (uint64_t)UINT_MAX); 126 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 127 (uint64_t)(UINT_MAX - 1)); 128 129 /* Test 1 plane 16 bits per pixel format */ 130 info = drm_format_info(DRM_FORMAT_XRGB4444); 131 FAIL_ON(!info); 132 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 133 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 134 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 135 136 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 2); 137 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 4); 138 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1280); 139 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 2048); 140 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 3840); 141 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 8192); 142 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 1342); 143 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 144 (uint64_t)UINT_MAX * 2); 145 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 146 (uint64_t)(UINT_MAX - 1) * 2); 147 148 /* Test 1 plane 24 bits per pixel format */ 149 info = drm_format_info(DRM_FORMAT_RGB888); 150 FAIL_ON(!info); 151 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 152 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 153 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 154 155 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 3); 156 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 6); 157 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1920); 158 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 3072); 159 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 5760); 160 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 12288); 161 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 2013); 162 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 163 (uint64_t)UINT_MAX * 3); 164 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 165 (uint64_t)(UINT_MAX - 1) * 3); 166 167 /* Test 1 plane 32 bits per pixel format */ 168 info = drm_format_info(DRM_FORMAT_ABGR8888); 169 FAIL_ON(!info); 170 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 171 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 172 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 173 174 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 4); 175 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 8); 176 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 2560); 177 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 4096); 178 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 7680); 179 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 16384); 180 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 2684); 181 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 182 (uint64_t)UINT_MAX * 4); 183 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 184 (uint64_t)(UINT_MAX - 1) * 4); 185 186 /* Test 2 planes format */ 187 info = drm_format_info(DRM_FORMAT_NV12); 188 FAIL_ON(!info); 189 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 190 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 191 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 192 FAIL_ON(drm_format_info_min_pitch(info, 2, 0) != 0); 193 194 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 195 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 2); 196 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 197 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 2); 198 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 199 FAIL_ON(drm_format_info_min_pitch(info, 1, 320) != 640); 200 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 201 FAIL_ON(drm_format_info_min_pitch(info, 1, 512) != 1024); 202 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 203 FAIL_ON(drm_format_info_min_pitch(info, 1, 960) != 1920); 204 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 205 FAIL_ON(drm_format_info_min_pitch(info, 1, 2048) != 4096); 206 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 207 FAIL_ON(drm_format_info_min_pitch(info, 1, 336) != 672); 208 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 209 (uint64_t)UINT_MAX); 210 FAIL_ON(drm_format_info_min_pitch(info, 1, UINT_MAX / 2 + 1) != 211 (uint64_t)UINT_MAX + 1); 212 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1)) != 213 (uint64_t)(UINT_MAX - 1)); 214 FAIL_ON(drm_format_info_min_pitch(info, 1, (UINT_MAX - 1) / 2) != 215 (uint64_t)(UINT_MAX - 1)); 216 217 /* Test 3 planes 8 bits per pixel format */ 218 info = drm_format_info(DRM_FORMAT_YUV422); 219 FAIL_ON(!info); 220 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 221 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 222 FAIL_ON(drm_format_info_min_pitch(info, 2, 0) != 0); 223 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 224 FAIL_ON(drm_format_info_min_pitch(info, 3, 0) != 0); 225 226 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 1); 227 FAIL_ON(drm_format_info_min_pitch(info, 1, 1) != 1); 228 FAIL_ON(drm_format_info_min_pitch(info, 2, 1) != 1); 229 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 2); 230 FAIL_ON(drm_format_info_min_pitch(info, 1, 2) != 2); 231 FAIL_ON(drm_format_info_min_pitch(info, 2, 2) != 2); 232 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 640); 233 FAIL_ON(drm_format_info_min_pitch(info, 1, 320) != 320); 234 FAIL_ON(drm_format_info_min_pitch(info, 2, 320) != 320); 235 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 1024); 236 FAIL_ON(drm_format_info_min_pitch(info, 1, 512) != 512); 237 FAIL_ON(drm_format_info_min_pitch(info, 2, 512) != 512); 238 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 1920); 239 FAIL_ON(drm_format_info_min_pitch(info, 1, 960) != 960); 240 FAIL_ON(drm_format_info_min_pitch(info, 2, 960) != 960); 241 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 4096); 242 FAIL_ON(drm_format_info_min_pitch(info, 1, 2048) != 2048); 243 FAIL_ON(drm_format_info_min_pitch(info, 2, 2048) != 2048); 244 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 671); 245 FAIL_ON(drm_format_info_min_pitch(info, 1, 336) != 336); 246 FAIL_ON(drm_format_info_min_pitch(info, 2, 336) != 336); 247 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 248 (uint64_t)UINT_MAX); 249 FAIL_ON(drm_format_info_min_pitch(info, 1, UINT_MAX / 2 + 1) != 250 (uint64_t)UINT_MAX / 2 + 1); 251 FAIL_ON(drm_format_info_min_pitch(info, 2, UINT_MAX / 2 + 1) != 252 (uint64_t)UINT_MAX / 2 + 1); 253 FAIL_ON(drm_format_info_min_pitch(info, 0, (UINT_MAX - 1) / 2) != 254 (uint64_t)(UINT_MAX - 1) / 2); 255 FAIL_ON(drm_format_info_min_pitch(info, 1, (UINT_MAX - 1) / 2) != 256 (uint64_t)(UINT_MAX - 1) / 2); 257 FAIL_ON(drm_format_info_min_pitch(info, 2, (UINT_MAX - 1) / 2) != 258 (uint64_t)(UINT_MAX - 1) / 2); 259 260 /* Test tiled format */ 261 info = drm_format_info(DRM_FORMAT_X0L2); 262 FAIL_ON(!info); 263 FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); 264 FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); 265 FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); 266 267 FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 2); 268 FAIL_ON(drm_format_info_min_pitch(info, 0, 2) != 4); 269 FAIL_ON(drm_format_info_min_pitch(info, 0, 640) != 1280); 270 FAIL_ON(drm_format_info_min_pitch(info, 0, 1024) != 2048); 271 FAIL_ON(drm_format_info_min_pitch(info, 0, 1920) != 3840); 272 FAIL_ON(drm_format_info_min_pitch(info, 0, 4096) != 8192); 273 FAIL_ON(drm_format_info_min_pitch(info, 0, 671) != 1342); 274 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 275 (uint64_t)UINT_MAX * 2); 276 FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != 277 (uint64_t)(UINT_MAX - 1) * 2); 278 279 /* Test format with cpp/char_per_block 0 */ > 280 info = drm_format_info(DRM_FORMAT_VUY101010); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/gpu/drm/selftests/test-drm_format.c b/drivers/gpu/drm/selftests/test-drm_format.c index c5e212a..155e4ce 100644 --- a/drivers/gpu/drm/selftests/test-drm_format.c +++ b/drivers/gpu/drm/selftests/test-drm_format.c @@ -276,5 +276,14 @@ int igt_check_drm_format_min_pitch(void *ignored) FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX - 1) != (uint64_t)(UINT_MAX - 1) * 2); + /* Test format with cpp/char_per_block 0 */ + info = drm_format_info(DRM_FORMAT_VUY101010); + FAIL_ON(!info); + FAIL_ON(drm_format_info_min_pitch(info, 0, 0) != 0); + FAIL_ON(drm_format_info_min_pitch(info, -1, 0) != 0); + FAIL_ON(drm_format_info_min_pitch(info, 1, 0) != 0); + FAIL_ON(drm_format_info_min_pitch(info, 0, 1) != 0); + FAIL_ON(drm_format_info_min_pitch(info, 0, UINT_MAX) != 0); + return 0; }
We have introduced some new formats DRM_FORMAT_VUY101010, DRM_FORMAT_YUV420_8BIT, and DRM_FORMAT_YUV420_10BIT whose cpp is 0 (as they are defined in bits per pixel). We need to ensure that the pitch returned by drm_format_info_min_pitch() for such formats is always 0. Signed-off-by: Ayan Kumar halder <ayan.halder@arm.com> Depends on:- https://patchwork.freedesktop.org/patch/msgid/1552414556-5756-1-git-send-email-ayan.halder@arm.com --- drivers/gpu/drm/selftests/test-drm_format.c | 9 +++++++++ 1 file changed, 9 insertions(+)