Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm: dpu: Remove unused functions from msm_media_info.h

These functions aren't used anywhere, remove them.

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Sean Paul and committed by
Rob Clark
37686b5e 01b09d53

-171
-171
drivers/gpu/drm/msm/disp/dpu1/msm_media_info.h
··· 813 813 #define COLOR_FMT_P010_UBWC COLOR_FMT_P010_UBWC 814 814 #define COLOR_FMT_P010 COLOR_FMT_P010 815 815 816 - static inline unsigned int VENUS_EXTRADATA_SIZE(int width, int height) 817 - { 818 - (void)height; 819 - (void)width; 820 - 821 - /* 822 - * In the future, calculate the size based on the w/h but just 823 - * hardcode it for now since 16K satisfies all current usecases. 824 - */ 825 - return 16 * 1024; 826 - } 827 - 828 816 /* 829 817 * Function arguments: 830 818 * @color_fmt ··· 1200 1212 1201 1213 invalid_input: 1202 1214 return rgb_meta_scanlines; 1203 - } 1204 - 1205 - /* 1206 - * Function arguments: 1207 - * @color_fmt 1208 - * @width 1209 - * Progressive: width 1210 - * Interlaced: width 1211 - * @height 1212 - * Progressive: height 1213 - * Interlaced: height 1214 - */ 1215 - static inline unsigned int VENUS_BUFFER_SIZE( 1216 - int color_fmt, int width, int height) 1217 - { 1218 - const unsigned int extra_size = VENUS_EXTRADATA_SIZE(width, height); 1219 - unsigned int uv_alignment = 0, size = 0; 1220 - unsigned int y_plane, uv_plane, y_stride, 1221 - uv_stride, y_sclines, uv_sclines; 1222 - unsigned int y_ubwc_plane = 0, uv_ubwc_plane = 0; 1223 - unsigned int y_meta_stride = 0, y_meta_scanlines = 0; 1224 - unsigned int uv_meta_stride = 0, uv_meta_scanlines = 0; 1225 - unsigned int y_meta_plane = 0, uv_meta_plane = 0; 1226 - unsigned int rgb_stride = 0, rgb_scanlines = 0; 1227 - unsigned int rgb_plane = 0, rgb_ubwc_plane = 0, rgb_meta_plane = 0; 1228 - unsigned int rgb_meta_stride = 0, rgb_meta_scanlines = 0; 1229 - 1230 - if (!width || !height) 1231 - goto invalid_input; 1232 - 1233 - y_stride = VENUS_Y_STRIDE(color_fmt, width); 1234 - uv_stride = VENUS_UV_STRIDE(color_fmt, width); 1235 - y_sclines = VENUS_Y_SCANLINES(color_fmt, height); 1236 - uv_sclines = VENUS_UV_SCANLINES(color_fmt, height); 1237 - rgb_stride = VENUS_RGB_STRIDE(color_fmt, width); 1238 - rgb_scanlines = VENUS_RGB_SCANLINES(color_fmt, height); 1239 - 1240 - switch (color_fmt) { 1241 - case COLOR_FMT_NV21: 1242 - case COLOR_FMT_NV12: 1243 - case COLOR_FMT_P010: 1244 - uv_alignment = 4096; 1245 - y_plane = y_stride * y_sclines; 1246 - uv_plane = uv_stride * uv_sclines + uv_alignment; 1247 - size = y_plane + uv_plane + 1248 - MSM_MEDIA_MAX(extra_size, 8 * y_stride); 1249 - size = MSM_MEDIA_ALIGN(size, 4096); 1250 - break; 1251 - case COLOR_FMT_NV12_MVTB: 1252 - uv_alignment = 4096; 1253 - y_plane = y_stride * y_sclines; 1254 - uv_plane = uv_stride * uv_sclines + uv_alignment; 1255 - size = y_plane + uv_plane; 1256 - size = 2 * size + extra_size; 1257 - size = MSM_MEDIA_ALIGN(size, 4096); 1258 - break; 1259 - case COLOR_FMT_NV12_UBWC: 1260 - y_sclines = VENUS_Y_SCANLINES(color_fmt, (height+1)>>1); 1261 - y_ubwc_plane = MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096); 1262 - uv_sclines = VENUS_UV_SCANLINES(color_fmt, (height+1)>>1); 1263 - uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096); 1264 - y_meta_stride = VENUS_Y_META_STRIDE(color_fmt, width); 1265 - y_meta_scanlines = 1266 - VENUS_Y_META_SCANLINES(color_fmt, (height+1)>>1); 1267 - y_meta_plane = MSM_MEDIA_ALIGN( 1268 - y_meta_stride * y_meta_scanlines, 4096); 1269 - uv_meta_stride = VENUS_UV_META_STRIDE(color_fmt, width); 1270 - uv_meta_scanlines = 1271 - VENUS_UV_META_SCANLINES(color_fmt, (height+1)>>1); 1272 - uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride * 1273 - uv_meta_scanlines, 4096); 1274 - 1275 - size = (y_ubwc_plane + uv_ubwc_plane + y_meta_plane + 1276 - uv_meta_plane)*2 + 1277 - MSM_MEDIA_MAX(extra_size + 8192, 48 * y_stride); 1278 - size = MSM_MEDIA_ALIGN(size, 4096); 1279 - break; 1280 - case COLOR_FMT_NV12_BPP10_UBWC: 1281 - y_ubwc_plane = MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096); 1282 - uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096); 1283 - y_meta_stride = VENUS_Y_META_STRIDE(color_fmt, width); 1284 - y_meta_scanlines = VENUS_Y_META_SCANLINES(color_fmt, height); 1285 - y_meta_plane = MSM_MEDIA_ALIGN( 1286 - y_meta_stride * y_meta_scanlines, 4096); 1287 - uv_meta_stride = VENUS_UV_META_STRIDE(color_fmt, width); 1288 - uv_meta_scanlines = VENUS_UV_META_SCANLINES(color_fmt, height); 1289 - uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride * 1290 - uv_meta_scanlines, 4096); 1291 - 1292 - size = y_ubwc_plane + uv_ubwc_plane + y_meta_plane + 1293 - uv_meta_plane + 1294 - MSM_MEDIA_MAX(extra_size + 8192, 48 * y_stride); 1295 - size = MSM_MEDIA_ALIGN(size, 4096); 1296 - break; 1297 - case COLOR_FMT_P010_UBWC: 1298 - y_ubwc_plane = MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096); 1299 - uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096); 1300 - y_meta_stride = VENUS_Y_META_STRIDE(color_fmt, width); 1301 - y_meta_scanlines = VENUS_Y_META_SCANLINES(color_fmt, height); 1302 - y_meta_plane = MSM_MEDIA_ALIGN( 1303 - y_meta_stride * y_meta_scanlines, 4096); 1304 - uv_meta_stride = VENUS_UV_META_STRIDE(color_fmt, width); 1305 - uv_meta_scanlines = VENUS_UV_META_SCANLINES(color_fmt, height); 1306 - uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride * 1307 - uv_meta_scanlines, 4096); 1308 - 1309 - size = y_ubwc_plane + uv_ubwc_plane + y_meta_plane + 1310 - uv_meta_plane; 1311 - size = MSM_MEDIA_ALIGN(size, 4096); 1312 - break; 1313 - case COLOR_FMT_RGBA8888: 1314 - rgb_plane = MSM_MEDIA_ALIGN(rgb_stride * rgb_scanlines, 4096); 1315 - size = rgb_plane; 1316 - size = MSM_MEDIA_ALIGN(size, 4096); 1317 - break; 1318 - case COLOR_FMT_RGBA8888_UBWC: 1319 - case COLOR_FMT_RGBA1010102_UBWC: 1320 - case COLOR_FMT_RGB565_UBWC: 1321 - rgb_ubwc_plane = MSM_MEDIA_ALIGN(rgb_stride * rgb_scanlines, 1322 - 4096); 1323 - rgb_meta_stride = VENUS_RGB_META_STRIDE(color_fmt, width); 1324 - rgb_meta_scanlines = VENUS_RGB_META_SCANLINES(color_fmt, 1325 - height); 1326 - rgb_meta_plane = MSM_MEDIA_ALIGN(rgb_meta_stride * 1327 - rgb_meta_scanlines, 4096); 1328 - size = rgb_ubwc_plane + rgb_meta_plane; 1329 - size = MSM_MEDIA_ALIGN(size, 4096); 1330 - break; 1331 - default: 1332 - break; 1333 - } 1334 - invalid_input: 1335 - return size; 1336 - } 1337 - 1338 - static inline unsigned int VENUS_VIEW2_OFFSET( 1339 - int color_fmt, int width, int height) 1340 - { 1341 - unsigned int offset = 0; 1342 - unsigned int y_plane, uv_plane, y_stride, 1343 - uv_stride, y_sclines, uv_sclines; 1344 - if (!width || !height) 1345 - goto invalid_input; 1346 - 1347 - y_stride = VENUS_Y_STRIDE(color_fmt, width); 1348 - uv_stride = VENUS_UV_STRIDE(color_fmt, width); 1349 - y_sclines = VENUS_Y_SCANLINES(color_fmt, height); 1350 - uv_sclines = VENUS_UV_SCANLINES(color_fmt, height); 1351 - switch (color_fmt) { 1352 - case COLOR_FMT_NV12_MVTB: 1353 - y_plane = y_stride * y_sclines; 1354 - uv_plane = uv_stride * uv_sclines; 1355 - offset = y_plane + uv_plane; 1356 - break; 1357 - default: 1358 - break; 1359 - } 1360 - invalid_input: 1361 - return offset; 1362 1215 } 1363 1216 1364 1217 #endif