197fb5e8dSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 225fdd593SJeykumar Sankaran /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. 30d1b10c6SAbhinav Kumar * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. 425fdd593SJeykumar Sankaran */ 525fdd593SJeykumar Sankaran 625fdd593SJeykumar Sankaran #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ 725fdd593SJeykumar Sankaran #include <linux/slab.h> 825fdd593SJeykumar Sankaran #include <linux/of_address.h> 925fdd593SJeykumar Sankaran #include <linux/platform_device.h> 1025fdd593SJeykumar Sankaran #include "dpu_hw_mdss.h" 11597762d5SDmitry Baryshkov #include "dpu_hw_interrupts.h" 1225fdd593SJeykumar Sankaran #include "dpu_hw_catalog.h" 1325fdd593SJeykumar Sankaran #include "dpu_kms.h" 1425fdd593SJeykumar Sankaran 15a2a448b4SDmitry Baryshkov #define VIG_BASE_MASK \ 167e3d6c54SDmitry Baryshkov (BIT(DPU_SSPP_QOS) |\ 17a2a448b4SDmitry Baryshkov BIT(DPU_SSPP_CDP) |\ 1825fdd593SJeykumar Sankaran BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_EXCL_RECT)) 1925fdd593SJeykumar Sankaran 20a2a448b4SDmitry Baryshkov #define VIG_MASK \ 21a2a448b4SDmitry Baryshkov (VIG_BASE_MASK | \ 22a2a448b4SDmitry Baryshkov BIT(DPU_SSPP_CSC_10BIT)) 23a2a448b4SDmitry Baryshkov 2494391a14SAngeloGioacchino Del Regno #define VIG_MSM8998_MASK \ 2594391a14SAngeloGioacchino Del Regno (VIG_MASK | BIT(DPU_SSPP_SCALER_QSEED3)) 2694391a14SAngeloGioacchino Del Regno 277bdc0c4bSKalyan Thota #define VIG_SDM845_MASK \ 28b8dab65bSAngeloGioacchino Del Regno (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3)) 297bdc0c4bSKalyan Thota 308b409996SDmitry Baryshkov #define VIG_SDM845_MASK_SDMA \ 318b409996SDmitry Baryshkov (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2)) 328b409996SDmitry Baryshkov 337bdc0c4bSKalyan Thota #define VIG_SC7180_MASK \ 34b8dab65bSAngeloGioacchino Del Regno (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4)) 357bdc0c4bSKalyan Thota 369b6f4fedSMarijn Suijten #define VIG_SM6125_MASK \ 379b6f4fedSMarijn Suijten (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE)) 389b6f4fedSMarijn Suijten 398b409996SDmitry Baryshkov #define VIG_SC7180_MASK_SDMA \ 408b409996SDmitry Baryshkov (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2)) 418b409996SDmitry Baryshkov 42a2a448b4SDmitry Baryshkov #define VIG_QCM2290_MASK (VIG_BASE_MASK | BIT(DPU_SSPP_QOS_8LVL)) 435334087eSLoic Poulain 4494391a14SAngeloGioacchino Del Regno #define DMA_MSM8998_MASK \ 457e3d6c54SDmitry Baryshkov (BIT(DPU_SSPP_QOS) |\ 4694391a14SAngeloGioacchino Del Regno BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_TS_PREFILL_REC1) |\ 4794391a14SAngeloGioacchino Del Regno BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_EXCL_RECT)) 4894391a14SAngeloGioacchino Del Regno 49dabfdd89SVinod Polimera #define VIG_SC7280_MASK \ 50dabfdd89SVinod Polimera (VIG_SC7180_MASK | BIT(DPU_SSPP_INLINE_ROTATION)) 51dabfdd89SVinod Polimera 528b409996SDmitry Baryshkov #define VIG_SC7280_MASK_SDMA \ 538b409996SDmitry Baryshkov (VIG_SC7280_MASK | BIT(DPU_SSPP_SMART_DMA_V2)) 548b409996SDmitry Baryshkov 5525fdd593SJeykumar Sankaran #define DMA_SDM845_MASK \ 567e3d6c54SDmitry Baryshkov (BIT(DPU_SSPP_QOS) | BIT(DPU_SSPP_QOS_8LVL) |\ 5725fdd593SJeykumar Sankaran BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_TS_PREFILL_REC1) |\ 5825fdd593SJeykumar Sankaran BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_EXCL_RECT)) 5925fdd593SJeykumar Sankaran 6007ca1fc0SSravanthi Kollukuduru #define DMA_CURSOR_SDM845_MASK \ 6107ca1fc0SSravanthi Kollukuduru (DMA_SDM845_MASK | BIT(DPU_SSPP_CURSOR)) 6207ca1fc0SSravanthi Kollukuduru 638b409996SDmitry Baryshkov #define DMA_SDM845_MASK_SDMA \ 648b409996SDmitry Baryshkov (DMA_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2)) 658b409996SDmitry Baryshkov 668b409996SDmitry Baryshkov #define DMA_CURSOR_SDM845_MASK_SDMA \ 678b409996SDmitry Baryshkov (DMA_CURSOR_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2)) 688b409996SDmitry Baryshkov 6994391a14SAngeloGioacchino Del Regno #define DMA_CURSOR_MSM8998_MASK \ 7094391a14SAngeloGioacchino Del Regno (DMA_MSM8998_MASK | BIT(DPU_SSPP_CURSOR)) 7194391a14SAngeloGioacchino Del Regno 722d8a4edbSDmitry Baryshkov #define MIXER_MSM8998_MASK \ 73a5045b00SDmitry Baryshkov (BIT(DPU_MIXER_SOURCESPLIT)) 7425fdd593SJeykumar Sankaran 752d8a4edbSDmitry Baryshkov #define MIXER_SDM845_MASK \ 762d8a4edbSDmitry Baryshkov (BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) 772d8a4edbSDmitry Baryshkov 7800feff8fSDmitry Baryshkov #define MIXER_QCM2290_MASK \ 792d8a4edbSDmitry Baryshkov (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) 807bdc0c4bSKalyan Thota 81fe9d66cfSMarijn Suijten #define PINGPONG_SDM845_MASK \ 82c20c4440SKuogee Hsieh (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_TE) | BIT(DPU_PINGPONG_DSC)) 8325fdd593SJeykumar Sankaran 84fe9d66cfSMarijn Suijten #define PINGPONG_SDM845_TE2_MASK \ 8525fdd593SJeykumar Sankaran (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) 8625fdd593SJeykumar Sankaran 87fe9d66cfSMarijn Suijten #define PINGPONG_SM8150_MASK \ 88c20c4440SKuogee Hsieh (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC)) 89fe9d66cfSMarijn Suijten 90591e34a0SKrishna Manikandan #define CTL_SC7280_MASK \ 9183a58b20SKalyan Thota (BIT(DPU_CTL_ACTIVE_CFG) | \ 9283a58b20SKalyan Thota BIT(DPU_CTL_FETCH_ACTIVE) | \ 9383a58b20SKalyan Thota BIT(DPU_CTL_VM_CFG) | \ 9483a58b20SKalyan Thota BIT(DPU_CTL_DSPP_SUB_BLOCK_FLUSH)) 95591e34a0SKrishna Manikandan 96e92a4ae1SDmitry Baryshkov #define CTL_SM8550_MASK \ 97e92a4ae1SDmitry Baryshkov (CTL_SC7280_MASK | BIT(DPU_CTL_HAS_LAYER_EXT4)) 98e92a4ae1SDmitry Baryshkov 994259ff7aSKalyan Thota #define DSPP_SC7180_MASK BIT(DPU_DSPP_PCC) 100e47616dfSKalyan Thota 101e3969eadSVinod Polimera #define INTF_SC7180_MASK \ 102a7129231SKonrad Dybcio (BIT(DPU_INTF_INPUT_CTRL) | \ 103a7129231SKonrad Dybcio BIT(DPU_INTF_TE) | \ 104a7129231SKonrad Dybcio BIT(DPU_INTF_STATUS_SUPPORTED) | \ 105a7129231SKonrad Dybcio BIT(DPU_DATA_HCTL_EN)) 106cace3ac4SJonathan Marek 10778145228SAbhinav Kumar #define INTF_SC7280_MASK (INTF_SC7180_MASK) 108591e34a0SKrishna Manikandan 10953324b99SAbhinav Kumar #define WB_SM8250_MASK (BIT(DPU_WB_LINE_MODE) | \ 11053324b99SAbhinav Kumar BIT(DPU_WB_UBWC) | \ 11153324b99SAbhinav Kumar BIT(DPU_WB_YUV_CONFIG) | \ 11253324b99SAbhinav Kumar BIT(DPU_WB_PIPE_ALPHA) | \ 11353324b99SAbhinav Kumar BIT(DPU_WB_XY_ROI_OFFSET) | \ 11453324b99SAbhinav Kumar BIT(DPU_WB_QOS) | \ 11553324b99SAbhinav Kumar BIT(DPU_WB_QOS_8LVL) | \ 11653324b99SAbhinav Kumar BIT(DPU_WB_CDP) | \ 11753324b99SAbhinav Kumar BIT(DPU_WB_INPUT_CTRL)) 11853324b99SAbhinav Kumar 11925fdd593SJeykumar Sankaran #define DEFAULT_PIXEL_RAM_SIZE (50 * 1024) 12025fdd593SJeykumar Sankaran #define DEFAULT_DPU_LINE_WIDTH 2048 12125fdd593SJeykumar Sankaran #define DEFAULT_DPU_OUTPUT_LINE_WIDTH 2560 12225fdd593SJeykumar Sankaran 12325fdd593SJeykumar Sankaran #define MAX_HORZ_DECIMATION 4 12425fdd593SJeykumar Sankaran #define MAX_VERT_DECIMATION 4 12525fdd593SJeykumar Sankaran 12625fdd593SJeykumar Sankaran #define MAX_UPSCALE_RATIO 20 12725fdd593SJeykumar Sankaran #define MAX_DOWNSCALE_RATIO 4 12825fdd593SJeykumar Sankaran #define SSPP_UNITY_SCALE 1 12925fdd593SJeykumar Sankaran 13025fdd593SJeykumar Sankaran #define STRCAT(X, Y) (X Y) 13125fdd593SJeykumar Sankaran 13209c7e370SLee Jones static const uint32_t plane_formats[] = { 13309c7e370SLee Jones DRM_FORMAT_ARGB8888, 13409c7e370SLee Jones DRM_FORMAT_ABGR8888, 13509c7e370SLee Jones DRM_FORMAT_RGBA8888, 13609c7e370SLee Jones DRM_FORMAT_BGRA8888, 13709c7e370SLee Jones DRM_FORMAT_XRGB8888, 13809c7e370SLee Jones DRM_FORMAT_RGBX8888, 13909c7e370SLee Jones DRM_FORMAT_BGRX8888, 14009c7e370SLee Jones DRM_FORMAT_XBGR8888, 141ffbbed63SLeonard Lausen DRM_FORMAT_ARGB2101010, 142da7716a2SJessica Zhang DRM_FORMAT_XRGB2101010, 14309c7e370SLee Jones DRM_FORMAT_RGB888, 14409c7e370SLee Jones DRM_FORMAT_BGR888, 14509c7e370SLee Jones DRM_FORMAT_RGB565, 14609c7e370SLee Jones DRM_FORMAT_BGR565, 14709c7e370SLee Jones DRM_FORMAT_ARGB1555, 14809c7e370SLee Jones DRM_FORMAT_ABGR1555, 14909c7e370SLee Jones DRM_FORMAT_RGBA5551, 15009c7e370SLee Jones DRM_FORMAT_BGRA5551, 15109c7e370SLee Jones DRM_FORMAT_XRGB1555, 15209c7e370SLee Jones DRM_FORMAT_XBGR1555, 15309c7e370SLee Jones DRM_FORMAT_RGBX5551, 15409c7e370SLee Jones DRM_FORMAT_BGRX5551, 15509c7e370SLee Jones DRM_FORMAT_ARGB4444, 15609c7e370SLee Jones DRM_FORMAT_ABGR4444, 15709c7e370SLee Jones DRM_FORMAT_RGBA4444, 15809c7e370SLee Jones DRM_FORMAT_BGRA4444, 15909c7e370SLee Jones DRM_FORMAT_XRGB4444, 16009c7e370SLee Jones DRM_FORMAT_XBGR4444, 16109c7e370SLee Jones DRM_FORMAT_RGBX4444, 16209c7e370SLee Jones DRM_FORMAT_BGRX4444, 16309c7e370SLee Jones }; 16409c7e370SLee Jones 16509c7e370SLee Jones static const uint32_t plane_formats_yuv[] = { 16609c7e370SLee Jones DRM_FORMAT_ARGB8888, 16709c7e370SLee Jones DRM_FORMAT_ABGR8888, 16809c7e370SLee Jones DRM_FORMAT_RGBA8888, 16909c7e370SLee Jones DRM_FORMAT_BGRX8888, 17009c7e370SLee Jones DRM_FORMAT_BGRA8888, 171ffbbed63SLeonard Lausen DRM_FORMAT_ARGB2101010, 172da7716a2SJessica Zhang DRM_FORMAT_XRGB2101010, 17309c7e370SLee Jones DRM_FORMAT_XRGB8888, 17409c7e370SLee Jones DRM_FORMAT_XBGR8888, 17509c7e370SLee Jones DRM_FORMAT_RGBX8888, 17609c7e370SLee Jones DRM_FORMAT_RGB888, 17709c7e370SLee Jones DRM_FORMAT_BGR888, 17809c7e370SLee Jones DRM_FORMAT_RGB565, 17909c7e370SLee Jones DRM_FORMAT_BGR565, 18009c7e370SLee Jones DRM_FORMAT_ARGB1555, 18109c7e370SLee Jones DRM_FORMAT_ABGR1555, 18209c7e370SLee Jones DRM_FORMAT_RGBA5551, 18309c7e370SLee Jones DRM_FORMAT_BGRA5551, 18409c7e370SLee Jones DRM_FORMAT_XRGB1555, 18509c7e370SLee Jones DRM_FORMAT_XBGR1555, 18609c7e370SLee Jones DRM_FORMAT_RGBX5551, 18709c7e370SLee Jones DRM_FORMAT_BGRX5551, 18809c7e370SLee Jones DRM_FORMAT_ARGB4444, 18909c7e370SLee Jones DRM_FORMAT_ABGR4444, 19009c7e370SLee Jones DRM_FORMAT_RGBA4444, 19109c7e370SLee Jones DRM_FORMAT_BGRA4444, 19209c7e370SLee Jones DRM_FORMAT_XRGB4444, 19309c7e370SLee Jones DRM_FORMAT_XBGR4444, 19409c7e370SLee Jones DRM_FORMAT_RGBX4444, 19509c7e370SLee Jones DRM_FORMAT_BGRX4444, 19609c7e370SLee Jones 197f07c9946SJessica Zhang DRM_FORMAT_P010, 19809c7e370SLee Jones DRM_FORMAT_NV12, 19909c7e370SLee Jones DRM_FORMAT_NV21, 20009c7e370SLee Jones DRM_FORMAT_NV16, 20109c7e370SLee Jones DRM_FORMAT_NV61, 20209c7e370SLee Jones DRM_FORMAT_VYUY, 20309c7e370SLee Jones DRM_FORMAT_UYVY, 20409c7e370SLee Jones DRM_FORMAT_YUYV, 20509c7e370SLee Jones DRM_FORMAT_YVYU, 20609c7e370SLee Jones DRM_FORMAT_YUV420, 20709c7e370SLee Jones DRM_FORMAT_YVU420, 20809c7e370SLee Jones }; 20909c7e370SLee Jones 210dabfdd89SVinod Polimera static const u32 rotation_v2_formats[] = { 211dabfdd89SVinod Polimera DRM_FORMAT_NV12, 212dabfdd89SVinod Polimera /* TODO add formats after validation */ 213dabfdd89SVinod Polimera }; 214dabfdd89SVinod Polimera 21553324b99SAbhinav Kumar static const uint32_t wb2_formats[] = { 21653324b99SAbhinav Kumar DRM_FORMAT_RGB565, 21753324b99SAbhinav Kumar DRM_FORMAT_BGR565, 21853324b99SAbhinav Kumar DRM_FORMAT_RGB888, 21953324b99SAbhinav Kumar DRM_FORMAT_ARGB8888, 22053324b99SAbhinav Kumar DRM_FORMAT_RGBA8888, 22153324b99SAbhinav Kumar DRM_FORMAT_ABGR8888, 22253324b99SAbhinav Kumar DRM_FORMAT_XRGB8888, 22353324b99SAbhinav Kumar DRM_FORMAT_RGBX8888, 22453324b99SAbhinav Kumar DRM_FORMAT_XBGR8888, 22553324b99SAbhinav Kumar DRM_FORMAT_ARGB1555, 22653324b99SAbhinav Kumar DRM_FORMAT_RGBA5551, 22753324b99SAbhinav Kumar DRM_FORMAT_XRGB1555, 22853324b99SAbhinav Kumar DRM_FORMAT_RGBX5551, 22953324b99SAbhinav Kumar DRM_FORMAT_ARGB4444, 23053324b99SAbhinav Kumar DRM_FORMAT_RGBA4444, 23153324b99SAbhinav Kumar DRM_FORMAT_RGBX4444, 23253324b99SAbhinav Kumar DRM_FORMAT_XRGB4444, 23353324b99SAbhinav Kumar DRM_FORMAT_BGR565, 23453324b99SAbhinav Kumar DRM_FORMAT_BGR888, 23553324b99SAbhinav Kumar DRM_FORMAT_ABGR8888, 23653324b99SAbhinav Kumar DRM_FORMAT_BGRA8888, 23753324b99SAbhinav Kumar DRM_FORMAT_BGRX8888, 23853324b99SAbhinav Kumar DRM_FORMAT_XBGR8888, 23953324b99SAbhinav Kumar DRM_FORMAT_ABGR1555, 24053324b99SAbhinav Kumar DRM_FORMAT_BGRA5551, 24153324b99SAbhinav Kumar DRM_FORMAT_XBGR1555, 24253324b99SAbhinav Kumar DRM_FORMAT_BGRX5551, 24353324b99SAbhinav Kumar DRM_FORMAT_ABGR4444, 24453324b99SAbhinav Kumar DRM_FORMAT_BGRA4444, 24553324b99SAbhinav Kumar DRM_FORMAT_BGRX4444, 24653324b99SAbhinav Kumar DRM_FORMAT_XBGR4444, 24753324b99SAbhinav Kumar }; 24853324b99SAbhinav Kumar 24925fdd593SJeykumar Sankaran /************************************************************* 25025fdd593SJeykumar Sankaran * SSPP sub blocks config 25125fdd593SJeykumar Sankaran *************************************************************/ 25225fdd593SJeykumar Sankaran 25325fdd593SJeykumar Sankaran /* SSPP common configuration */ 254274909a8SRyan McCann #define _VIG_SBLK(sdma_pri, qseed_ver) \ 25525fdd593SJeykumar Sankaran { \ 25625fdd593SJeykumar Sankaran .maxdwnscale = MAX_DOWNSCALE_RATIO, \ 25725fdd593SJeykumar Sankaran .maxupscale = MAX_UPSCALE_RATIO, \ 25825fdd593SJeykumar Sankaran .smart_dma_priority = sdma_pri, \ 259274909a8SRyan McCann .scaler_blk = {.name = "scaler", \ 260b75ab05aSShubhashree Dhar .id = qseed_ver, \ 26125fdd593SJeykumar Sankaran .base = 0xa00, .len = 0xa0,}, \ 262274909a8SRyan McCann .csc_blk = {.name = "csc", \ 26325fdd593SJeykumar Sankaran .id = DPU_SSPP_CSC_10BIT, \ 26425fdd593SJeykumar Sankaran .base = 0x1a00, .len = 0x100,}, \ 26525fdd593SJeykumar Sankaran .format_list = plane_formats_yuv, \ 266e6b63a7bSFritz Koenig .num_formats = ARRAY_SIZE(plane_formats_yuv), \ 26725fdd593SJeykumar Sankaran .virt_format_list = plane_formats, \ 268e6b63a7bSFritz Koenig .virt_num_formats = ARRAY_SIZE(plane_formats), \ 269dabfdd89SVinod Polimera .rotation_cfg = NULL, \ 270dabfdd89SVinod Polimera } 271dabfdd89SVinod Polimera 272274909a8SRyan McCann #define _VIG_SBLK_ROT(sdma_pri, qseed_ver, rot_cfg) \ 273dabfdd89SVinod Polimera { \ 274dabfdd89SVinod Polimera .maxdwnscale = MAX_DOWNSCALE_RATIO, \ 275dabfdd89SVinod Polimera .maxupscale = MAX_UPSCALE_RATIO, \ 276dabfdd89SVinod Polimera .smart_dma_priority = sdma_pri, \ 277274909a8SRyan McCann .scaler_blk = {.name = "scaler", \ 278dabfdd89SVinod Polimera .id = qseed_ver, \ 279dabfdd89SVinod Polimera .base = 0xa00, .len = 0xa0,}, \ 280274909a8SRyan McCann .csc_blk = {.name = "csc", \ 281dabfdd89SVinod Polimera .id = DPU_SSPP_CSC_10BIT, \ 282dabfdd89SVinod Polimera .base = 0x1a00, .len = 0x100,}, \ 283dabfdd89SVinod Polimera .format_list = plane_formats_yuv, \ 284dabfdd89SVinod Polimera .num_formats = ARRAY_SIZE(plane_formats_yuv), \ 285dabfdd89SVinod Polimera .virt_format_list = plane_formats, \ 286dabfdd89SVinod Polimera .virt_num_formats = ARRAY_SIZE(plane_formats), \ 287dabfdd89SVinod Polimera .rotation_cfg = rot_cfg, \ 28825fdd593SJeykumar Sankaran } 28925fdd593SJeykumar Sankaran 2901071a22cSRyan McCann #define _DMA_SBLK(sdma_pri) \ 29125fdd593SJeykumar Sankaran { \ 29225fdd593SJeykumar Sankaran .maxdwnscale = SSPP_UNITY_SCALE, \ 29325fdd593SJeykumar Sankaran .maxupscale = SSPP_UNITY_SCALE, \ 29425fdd593SJeykumar Sankaran .smart_dma_priority = sdma_pri, \ 29525fdd593SJeykumar Sankaran .format_list = plane_formats, \ 296e6b63a7bSFritz Koenig .num_formats = ARRAY_SIZE(plane_formats), \ 29725fdd593SJeykumar Sankaran .virt_format_list = plane_formats, \ 298e6b63a7bSFritz Koenig .virt_num_formats = ARRAY_SIZE(plane_formats), \ 29925fdd593SJeykumar Sankaran } 30025fdd593SJeykumar Sankaran 30194391a14SAngeloGioacchino Del Regno static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 = 302274909a8SRyan McCann _VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3); 30394391a14SAngeloGioacchino Del Regno static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 = 304274909a8SRyan McCann _VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3); 30594391a14SAngeloGioacchino Del Regno static const struct dpu_sspp_sub_blks msm8998_vig_sblk_2 = 306274909a8SRyan McCann _VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3); 30794391a14SAngeloGioacchino Del Regno static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 = 308274909a8SRyan McCann _VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3); 30994391a14SAngeloGioacchino Del Regno 310dabfdd89SVinod Polimera static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = { 311dabfdd89SVinod Polimera .rot_maxheight = 1088, 312dabfdd89SVinod Polimera .rot_num_formats = ARRAY_SIZE(rotation_v2_formats), 313dabfdd89SVinod Polimera .rot_format_list = rotation_v2_formats, 314dabfdd89SVinod Polimera }; 315dabfdd89SVinod Polimera 316b75ab05aSShubhashree Dhar static const struct dpu_sspp_sub_blks sdm845_vig_sblk_0 = 317274909a8SRyan McCann _VIG_SBLK(5, DPU_SSPP_SCALER_QSEED3); 318b75ab05aSShubhashree Dhar static const struct dpu_sspp_sub_blks sdm845_vig_sblk_1 = 319274909a8SRyan McCann _VIG_SBLK(6, DPU_SSPP_SCALER_QSEED3); 320b75ab05aSShubhashree Dhar static const struct dpu_sspp_sub_blks sdm845_vig_sblk_2 = 321274909a8SRyan McCann _VIG_SBLK(7, DPU_SSPP_SCALER_QSEED3); 322b75ab05aSShubhashree Dhar static const struct dpu_sspp_sub_blks sdm845_vig_sblk_3 = 323274909a8SRyan McCann _VIG_SBLK(8, DPU_SSPP_SCALER_QSEED3); 32425fdd593SJeykumar Sankaran 3251071a22cSRyan McCann static const struct dpu_sspp_sub_blks sdm845_dma_sblk_0 = _DMA_SBLK(1); 3261071a22cSRyan McCann static const struct dpu_sspp_sub_blks sdm845_dma_sblk_1 = _DMA_SBLK(2); 3271071a22cSRyan McCann static const struct dpu_sspp_sub_blks sdm845_dma_sblk_2 = _DMA_SBLK(3); 3281071a22cSRyan McCann static const struct dpu_sspp_sub_blks sdm845_dma_sblk_3 = _DMA_SBLK(4); 32925fdd593SJeykumar Sankaran 330b75ab05aSShubhashree Dhar static const struct dpu_sspp_sub_blks sc7180_vig_sblk_0 = 331274909a8SRyan McCann _VIG_SBLK(4, DPU_SSPP_SCALER_QSEED4); 332b75ab05aSShubhashree Dhar 333dabfdd89SVinod Polimera static const struct dpu_sspp_sub_blks sc7280_vig_sblk_0 = 334274909a8SRyan McCann _VIG_SBLK_ROT(4, DPU_SSPP_SCALER_QSEED4, &dpu_rot_sc7280_cfg_v2); 335dabfdd89SVinod Polimera 3363581b706SAdam Skladowski static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 = 337274909a8SRyan McCann _VIG_SBLK(2, DPU_SSPP_SCALER_QSEED4); 3383581b706SAdam Skladowski 3399b6f4fedSMarijn Suijten static const struct dpu_sspp_sub_blks sm6125_vig_sblk_0 = 3409b6f4fedSMarijn Suijten _VIG_SBLK(3, DPU_SSPP_SCALER_QSEED3LITE); 3419b6f4fedSMarijn Suijten 342d21fc5dfSDmitry Baryshkov static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 = 343274909a8SRyan McCann _VIG_SBLK(5, DPU_SSPP_SCALER_QSEED4); 344d21fc5dfSDmitry Baryshkov static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 = 345274909a8SRyan McCann _VIG_SBLK(6, DPU_SSPP_SCALER_QSEED4); 346d21fc5dfSDmitry Baryshkov static const struct dpu_sspp_sub_blks sm8250_vig_sblk_2 = 347274909a8SRyan McCann _VIG_SBLK(7, DPU_SSPP_SCALER_QSEED4); 348d21fc5dfSDmitry Baryshkov static const struct dpu_sspp_sub_blks sm8250_vig_sblk_3 = 349274909a8SRyan McCann _VIG_SBLK(8, DPU_SSPP_SCALER_QSEED4); 350d21fc5dfSDmitry Baryshkov 351efcd0107SNeil Armstrong static const struct dpu_sspp_sub_blks sm8550_vig_sblk_0 = 352274909a8SRyan McCann _VIG_SBLK(7, DPU_SSPP_SCALER_QSEED4); 353efcd0107SNeil Armstrong static const struct dpu_sspp_sub_blks sm8550_vig_sblk_1 = 354274909a8SRyan McCann _VIG_SBLK(8, DPU_SSPP_SCALER_QSEED4); 355efcd0107SNeil Armstrong static const struct dpu_sspp_sub_blks sm8550_vig_sblk_2 = 356274909a8SRyan McCann _VIG_SBLK(9, DPU_SSPP_SCALER_QSEED4); 357efcd0107SNeil Armstrong static const struct dpu_sspp_sub_blks sm8550_vig_sblk_3 = 358274909a8SRyan McCann _VIG_SBLK(10, DPU_SSPP_SCALER_QSEED4); 3591071a22cSRyan McCann static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK(5); 3601071a22cSRyan McCann static const struct dpu_sspp_sub_blks sm8550_dma_sblk_5 = _DMA_SBLK(6); 361efcd0107SNeil Armstrong 3621071a22cSRyan McCann #define _VIG_SBLK_NOSCALE(sdma_pri) \ 3635334087eSLoic Poulain { \ 3645334087eSLoic Poulain .maxdwnscale = SSPP_UNITY_SCALE, \ 3655334087eSLoic Poulain .maxupscale = SSPP_UNITY_SCALE, \ 3665334087eSLoic Poulain .smart_dma_priority = sdma_pri, \ 3675334087eSLoic Poulain .format_list = plane_formats_yuv, \ 3685334087eSLoic Poulain .num_formats = ARRAY_SIZE(plane_formats_yuv), \ 3695334087eSLoic Poulain .virt_format_list = plane_formats, \ 3705334087eSLoic Poulain .virt_num_formats = ARRAY_SIZE(plane_formats), \ 3715334087eSLoic Poulain } 3725334087eSLoic Poulain 3731071a22cSRyan McCann static const struct dpu_sspp_sub_blks qcm2290_vig_sblk_0 = _VIG_SBLK_NOSCALE(2); 3741071a22cSRyan McCann static const struct dpu_sspp_sub_blks qcm2290_dma_sblk_0 = _DMA_SBLK(1); 3755334087eSLoic Poulain 37625fdd593SJeykumar Sankaran /************************************************************* 37725fdd593SJeykumar Sankaran * MIXER sub blocks config 37825fdd593SJeykumar Sankaran *************************************************************/ 3797bdc0c4bSKalyan Thota 38094391a14SAngeloGioacchino Del Regno /* MSM8998 */ 38194391a14SAngeloGioacchino Del Regno 38294391a14SAngeloGioacchino Del Regno static const struct dpu_lm_sub_blks msm8998_lm_sblk = { 38394391a14SAngeloGioacchino Del Regno .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 38494391a14SAngeloGioacchino Del Regno .maxblendstages = 7, /* excluding base layer */ 38594391a14SAngeloGioacchino Del Regno .blendstage_base = { /* offsets relative to mixer base */ 38694391a14SAngeloGioacchino Del Regno 0x20, 0x50, 0x80, 0xb0, 0x230, 38794391a14SAngeloGioacchino Del Regno 0x260, 0x290 38894391a14SAngeloGioacchino Del Regno }, 38994391a14SAngeloGioacchino Del Regno }; 39094391a14SAngeloGioacchino Del Regno 39194391a14SAngeloGioacchino Del Regno /* SDM845 */ 39294391a14SAngeloGioacchino Del Regno 39394391a14SAngeloGioacchino Del Regno static const struct dpu_lm_sub_blks sdm845_lm_sblk = { 39494391a14SAngeloGioacchino Del Regno .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 39594391a14SAngeloGioacchino Del Regno .maxblendstages = 11, /* excluding base layer */ 39694391a14SAngeloGioacchino Del Regno .blendstage_base = { /* offsets relative to mixer base */ 39794391a14SAngeloGioacchino Del Regno 0x20, 0x38, 0x50, 0x68, 0x80, 0x98, 39894391a14SAngeloGioacchino Del Regno 0xb0, 0xc8, 0xe0, 0xf8, 0x110 39994391a14SAngeloGioacchino Del Regno }, 40094391a14SAngeloGioacchino Del Regno }; 40194391a14SAngeloGioacchino Del Regno 4027bdc0c4bSKalyan Thota /* SC7180 */ 4037bdc0c4bSKalyan Thota 4047bdc0c4bSKalyan Thota static const struct dpu_lm_sub_blks sc7180_lm_sblk = { 4057bdc0c4bSKalyan Thota .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 4067bdc0c4bSKalyan Thota .maxblendstages = 7, /* excluding base layer */ 4077bdc0c4bSKalyan Thota .blendstage_base = { /* offsets relative to mixer base */ 4087bdc0c4bSKalyan Thota 0x20, 0x38, 0x50, 0x68, 0x80, 0x98, 0xb0 4097bdc0c4bSKalyan Thota }, 4107bdc0c4bSKalyan Thota }; 4117bdc0c4bSKalyan Thota 4125334087eSLoic Poulain /* QCM2290 */ 4135334087eSLoic Poulain 4145334087eSLoic Poulain static const struct dpu_lm_sub_blks qcm2290_lm_sblk = { 415da06be8bSDmitry Baryshkov .maxwidth = DEFAULT_DPU_LINE_WIDTH, 4165334087eSLoic Poulain .maxblendstages = 4, /* excluding base layer */ 4175334087eSLoic Poulain .blendstage_base = { /* offsets relative to mixer base */ 4185334087eSLoic Poulain 0x20, 0x38, 0x50, 0x68 4195334087eSLoic Poulain }, 4205334087eSLoic Poulain }; 4215334087eSLoic Poulain 42225fdd593SJeykumar Sankaran /************************************************************* 423e47616dfSKalyan Thota * DSPP sub blocks config 424e47616dfSKalyan Thota *************************************************************/ 42594391a14SAngeloGioacchino Del Regno static const struct dpu_dspp_sub_blks msm8998_dspp_sblk = { 42646998bf8SRyan McCann .pcc = {.name = "pcc", .id = DPU_DSPP_PCC, .base = 0x1700, 42794391a14SAngeloGioacchino Del Regno .len = 0x90, .version = 0x10007}, 42894391a14SAngeloGioacchino Del Regno }; 42994391a14SAngeloGioacchino Del Regno 4309891b3dfSKonrad Dybcio static const struct dpu_dspp_sub_blks sdm845_dspp_sblk = { 43146998bf8SRyan McCann .pcc = {.name = "pcc", .id = DPU_DSPP_PCC, .base = 0x1700, 43205ae91d9SDmitry Baryshkov .len = 0x90, .version = 0x40000}, 43305ae91d9SDmitry Baryshkov }; 43405ae91d9SDmitry Baryshkov 435e47616dfSKalyan Thota /************************************************************* 43625fdd593SJeykumar Sankaran * PINGPONG sub blocks config 43725fdd593SJeykumar Sankaran *************************************************************/ 43825fdd593SJeykumar Sankaran static const struct dpu_pingpong_sub_blks sdm845_pp_sblk_te = { 43946998bf8SRyan McCann .te2 = {.name = "te2", .id = DPU_PINGPONG_TE2, .base = 0x2000, .len = 0x0, 44025fdd593SJeykumar Sankaran .version = 0x1}, 44146998bf8SRyan McCann .dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0x30e0, 44225fdd593SJeykumar Sankaran .len = 0x20, .version = 0x10000}, 44325fdd593SJeykumar Sankaran }; 44425fdd593SJeykumar Sankaran 44525fdd593SJeykumar Sankaran static const struct dpu_pingpong_sub_blks sdm845_pp_sblk = { 44646998bf8SRyan McCann .dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0x30e0, 44725fdd593SJeykumar Sankaran .len = 0x20, .version = 0x10000}, 44825fdd593SJeykumar Sankaran }; 44925fdd593SJeykumar Sankaran 450591e34a0SKrishna Manikandan static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = { 45146998bf8SRyan McCann .dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0xe0, 452591e34a0SKrishna Manikandan .len = 0x20, .version = 0x20000}, 453591e34a0SKrishna Manikandan }; 454591e34a0SKrishna Manikandan 4554369c93cSDmitry Baryshkov /************************************************************* 4567c5ab05eSVinod Koul * DSC sub blocks config 4577c5ab05eSVinod Koul *************************************************************/ 4580d1b10c6SAbhinav Kumar static const struct dpu_dsc_sub_blks dsc_sblk_0 = { 45946998bf8SRyan McCann .enc = {.name = "enc", .base = 0x100, .len = 0x100}, 46046998bf8SRyan McCann .ctl = {.name = "ctl", .base = 0xF00, .len = 0x10}, 4610d1b10c6SAbhinav Kumar }; 4620d1b10c6SAbhinav Kumar 4630d1b10c6SAbhinav Kumar static const struct dpu_dsc_sub_blks dsc_sblk_1 = { 46446998bf8SRyan McCann .enc = {.name = "enc", .base = 0x200, .len = 0x100}, 46546998bf8SRyan McCann .ctl = {.name = "ctl", .base = 0xF80, .len = 0x10}, 4660d1b10c6SAbhinav Kumar }; 4670d1b10c6SAbhinav Kumar 46825fdd593SJeykumar Sankaran /************************************************************* 46925fdd593SJeykumar Sankaran * VBIF sub blocks config 47025fdd593SJeykumar Sankaran *************************************************************/ 47125fdd593SJeykumar Sankaran /* VBIF QOS remap */ 47294391a14SAngeloGioacchino Del Regno static const u32 msm8998_rt_pri_lvl[] = {1, 2, 2, 2}; 47394391a14SAngeloGioacchino Del Regno static const u32 msm8998_nrt_pri_lvl[] = {1, 1, 1, 1}; 474abda0d92SStephen Boyd static const u32 sdm845_rt_pri_lvl[] = {3, 3, 4, 4, 5, 5, 6, 6}; 475abda0d92SStephen Boyd static const u32 sdm845_nrt_pri_lvl[] = {3, 3, 3, 3, 3, 3, 3, 3}; 47625fdd593SJeykumar Sankaran 47794391a14SAngeloGioacchino Del Regno static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = { 47894391a14SAngeloGioacchino Del Regno { 4793f23a52fSArnaud Vrac .pps = 1920 * 1080 * 30, 48094391a14SAngeloGioacchino Del Regno .ot_limit = 2, 48194391a14SAngeloGioacchino Del Regno }, 48294391a14SAngeloGioacchino Del Regno { 4833f23a52fSArnaud Vrac .pps = 1920 * 1080 * 60, 4843f23a52fSArnaud Vrac .ot_limit = 4, 48594391a14SAngeloGioacchino Del Regno }, 48694391a14SAngeloGioacchino Del Regno { 48794391a14SAngeloGioacchino Del Regno .pps = 3840 * 2160 * 30, 48894391a14SAngeloGioacchino Del Regno .ot_limit = 16, 48994391a14SAngeloGioacchino Del Regno }, 49094391a14SAngeloGioacchino Del Regno }; 49194391a14SAngeloGioacchino Del Regno 49294391a14SAngeloGioacchino Del Regno static const struct dpu_vbif_cfg msm8998_vbif[] = { 49394391a14SAngeloGioacchino Del Regno { 494606f015bSDmitry Baryshkov .name = "vbif_rt", .id = VBIF_RT, 49594391a14SAngeloGioacchino Del Regno .base = 0, .len = 0x1040, 49694391a14SAngeloGioacchino Del Regno .default_ot_rd_limit = 32, 49794391a14SAngeloGioacchino Del Regno .default_ot_wr_limit = 32, 49894391a14SAngeloGioacchino Del Regno .features = BIT(DPU_VBIF_QOS_REMAP) | BIT(DPU_VBIF_QOS_OTLIM), 49994391a14SAngeloGioacchino Del Regno .xin_halt_timeout = 0x4000, 500c8744315SDmitry Baryshkov .qos_rp_remap_size = 0x20, 50194391a14SAngeloGioacchino Del Regno .dynamic_ot_rd_tbl = { 50294391a14SAngeloGioacchino Del Regno .count = ARRAY_SIZE(msm8998_ot_rdwr_cfg), 50394391a14SAngeloGioacchino Del Regno .cfg = msm8998_ot_rdwr_cfg, 50494391a14SAngeloGioacchino Del Regno }, 50594391a14SAngeloGioacchino Del Regno .dynamic_ot_wr_tbl = { 50694391a14SAngeloGioacchino Del Regno .count = ARRAY_SIZE(msm8998_ot_rdwr_cfg), 50794391a14SAngeloGioacchino Del Regno .cfg = msm8998_ot_rdwr_cfg, 50894391a14SAngeloGioacchino Del Regno }, 50994391a14SAngeloGioacchino Del Regno .qos_rt_tbl = { 51094391a14SAngeloGioacchino Del Regno .npriority_lvl = ARRAY_SIZE(msm8998_rt_pri_lvl), 51194391a14SAngeloGioacchino Del Regno .priority_lvl = msm8998_rt_pri_lvl, 51294391a14SAngeloGioacchino Del Regno }, 51394391a14SAngeloGioacchino Del Regno .qos_nrt_tbl = { 51494391a14SAngeloGioacchino Del Regno .npriority_lvl = ARRAY_SIZE(msm8998_nrt_pri_lvl), 51594391a14SAngeloGioacchino Del Regno .priority_lvl = msm8998_nrt_pri_lvl, 51694391a14SAngeloGioacchino Del Regno }, 51794391a14SAngeloGioacchino Del Regno .memtype_count = 14, 51894391a14SAngeloGioacchino Del Regno .memtype = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, 51994391a14SAngeloGioacchino Del Regno }, 52094391a14SAngeloGioacchino Del Regno }; 52194391a14SAngeloGioacchino Del Regno 522abda0d92SStephen Boyd static const struct dpu_vbif_cfg sdm845_vbif[] = { 52325fdd593SJeykumar Sankaran { 524606f015bSDmitry Baryshkov .name = "vbif_rt", .id = VBIF_RT, 52525fdd593SJeykumar Sankaran .base = 0, .len = 0x1040, 52625fdd593SJeykumar Sankaran .features = BIT(DPU_VBIF_QOS_REMAP), 52725fdd593SJeykumar Sankaran .xin_halt_timeout = 0x4000, 528c8744315SDmitry Baryshkov .qos_rp_remap_size = 0x40, 52925fdd593SJeykumar Sankaran .qos_rt_tbl = { 53025fdd593SJeykumar Sankaran .npriority_lvl = ARRAY_SIZE(sdm845_rt_pri_lvl), 53125fdd593SJeykumar Sankaran .priority_lvl = sdm845_rt_pri_lvl, 53225fdd593SJeykumar Sankaran }, 53325fdd593SJeykumar Sankaran .qos_nrt_tbl = { 53425fdd593SJeykumar Sankaran .npriority_lvl = ARRAY_SIZE(sdm845_nrt_pri_lvl), 53525fdd593SJeykumar Sankaran .priority_lvl = sdm845_nrt_pri_lvl, 53625fdd593SJeykumar Sankaran }, 53725fdd593SJeykumar Sankaran .memtype_count = 14, 53825fdd593SJeykumar Sankaran .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 53925fdd593SJeykumar Sankaran }, 54025fdd593SJeykumar Sankaran }; 54125fdd593SJeykumar Sankaran 542*42d0d253SJonathan Marek static const struct dpu_vbif_cfg sm8550_vbif[] = { 543*42d0d253SJonathan Marek { 544*42d0d253SJonathan Marek .name = "vbif_rt", .id = VBIF_RT, 545*42d0d253SJonathan Marek .base = 0, .len = 0x1040, 546*42d0d253SJonathan Marek .features = BIT(DPU_VBIF_QOS_REMAP), 547*42d0d253SJonathan Marek .xin_halt_timeout = 0x4000, 548*42d0d253SJonathan Marek .qos_rp_remap_size = 0x40, 549*42d0d253SJonathan Marek .qos_rt_tbl = { 550*42d0d253SJonathan Marek .npriority_lvl = ARRAY_SIZE(sdm845_rt_pri_lvl), 551*42d0d253SJonathan Marek .priority_lvl = sdm845_rt_pri_lvl, 552*42d0d253SJonathan Marek }, 553*42d0d253SJonathan Marek .qos_nrt_tbl = { 554*42d0d253SJonathan Marek .npriority_lvl = ARRAY_SIZE(sdm845_nrt_pri_lvl), 555*42d0d253SJonathan Marek .priority_lvl = sdm845_nrt_pri_lvl, 556*42d0d253SJonathan Marek }, 557*42d0d253SJonathan Marek .memtype_count = 16, 558*42d0d253SJonathan Marek .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 559*42d0d253SJonathan Marek }, 560*42d0d253SJonathan Marek }; 561*42d0d253SJonathan Marek 56225fdd593SJeykumar Sankaran /************************************************************* 56325fdd593SJeykumar Sankaran * PERF data config 56425fdd593SJeykumar Sankaran *************************************************************/ 56525fdd593SJeykumar Sankaran 56625fdd593SJeykumar Sankaran /* SSPP QOS LUTs */ 56794391a14SAngeloGioacchino Del Regno static const struct dpu_qos_lut_entry msm8998_qos_linear[] = { 56894391a14SAngeloGioacchino Del Regno {.fl = 4, .lut = 0x1b}, 56994391a14SAngeloGioacchino Del Regno {.fl = 5, .lut = 0x5b}, 57094391a14SAngeloGioacchino Del Regno {.fl = 6, .lut = 0x15b}, 57194391a14SAngeloGioacchino Del Regno {.fl = 7, .lut = 0x55b}, 57294391a14SAngeloGioacchino Del Regno {.fl = 8, .lut = 0x155b}, 57394391a14SAngeloGioacchino Del Regno {.fl = 9, .lut = 0x555b}, 57494391a14SAngeloGioacchino Del Regno {.fl = 10, .lut = 0x1555b}, 57594391a14SAngeloGioacchino Del Regno {.fl = 11, .lut = 0x5555b}, 57694391a14SAngeloGioacchino Del Regno {.fl = 12, .lut = 0x15555b}, 5773f23a52fSArnaud Vrac {.fl = 0, .lut = 0x55555b} 57894391a14SAngeloGioacchino Del Regno }; 57994391a14SAngeloGioacchino Del Regno 580abda0d92SStephen Boyd static const struct dpu_qos_lut_entry sdm845_qos_linear[] = { 58125fdd593SJeykumar Sankaran {.fl = 4, .lut = 0x357}, 58225fdd593SJeykumar Sankaran {.fl = 5, .lut = 0x3357}, 58325fdd593SJeykumar Sankaran {.fl = 6, .lut = 0x23357}, 58425fdd593SJeykumar Sankaran {.fl = 7, .lut = 0x223357}, 58525fdd593SJeykumar Sankaran {.fl = 8, .lut = 0x2223357}, 58625fdd593SJeykumar Sankaran {.fl = 9, .lut = 0x22223357}, 58725fdd593SJeykumar Sankaran {.fl = 10, .lut = 0x222223357}, 58825fdd593SJeykumar Sankaran {.fl = 11, .lut = 0x2222223357}, 58925fdd593SJeykumar Sankaran {.fl = 12, .lut = 0x22222223357}, 59025fdd593SJeykumar Sankaran {.fl = 13, .lut = 0x222222223357}, 59125fdd593SJeykumar Sankaran {.fl = 14, .lut = 0x1222222223357}, 59225fdd593SJeykumar Sankaran {.fl = 0, .lut = 0x11222222223357} 59325fdd593SJeykumar Sankaran }; 59425fdd593SJeykumar Sankaran 59594391a14SAngeloGioacchino Del Regno static const struct dpu_qos_lut_entry msm8998_qos_macrotile[] = { 59694391a14SAngeloGioacchino Del Regno {.fl = 10, .lut = 0x1aaff}, 59794391a14SAngeloGioacchino Del Regno {.fl = 11, .lut = 0x5aaff}, 59894391a14SAngeloGioacchino Del Regno {.fl = 12, .lut = 0x15aaff}, 5993f23a52fSArnaud Vrac {.fl = 0, .lut = 0x55aaff}, 60094391a14SAngeloGioacchino Del Regno }; 60194391a14SAngeloGioacchino Del Regno 6027bdc0c4bSKalyan Thota static const struct dpu_qos_lut_entry sc7180_qos_linear[] = { 6037bdc0c4bSKalyan Thota {.fl = 0, .lut = 0x0011222222335777}, 6047bdc0c4bSKalyan Thota }; 6057bdc0c4bSKalyan Thota 6063186acbaSKonrad Dybcio static const struct dpu_qos_lut_entry sm6350_qos_linear_macrotile[] = { 6073186acbaSKonrad Dybcio {.fl = 0, .lut = 0x0011223445566777 }, 6083186acbaSKonrad Dybcio }; 6093186acbaSKonrad Dybcio 610386fced3SJonathan Marek static const struct dpu_qos_lut_entry sm8150_qos_linear[] = { 611386fced3SJonathan Marek {.fl = 0, .lut = 0x0011222222223357 }, 612386fced3SJonathan Marek }; 613386fced3SJonathan Marek 614f3af2d6eSRob Clark static const struct dpu_qos_lut_entry sc8180x_qos_linear[] = { 615f3af2d6eSRob Clark {.fl = 4, .lut = 0x0000000000000357 }, 616f3af2d6eSRob Clark }; 617f3af2d6eSRob Clark 6185334087eSLoic Poulain static const struct dpu_qos_lut_entry qcm2290_qos_linear[] = { 6195334087eSLoic Poulain {.fl = 0, .lut = 0x0011222222335777}, 6205334087eSLoic Poulain }; 6215334087eSLoic Poulain 622abda0d92SStephen Boyd static const struct dpu_qos_lut_entry sdm845_qos_macrotile[] = { 62325fdd593SJeykumar Sankaran {.fl = 10, .lut = 0x344556677}, 62425fdd593SJeykumar Sankaran {.fl = 11, .lut = 0x3344556677}, 62525fdd593SJeykumar Sankaran {.fl = 12, .lut = 0x23344556677}, 62625fdd593SJeykumar Sankaran {.fl = 13, .lut = 0x223344556677}, 62725fdd593SJeykumar Sankaran {.fl = 14, .lut = 0x1223344556677}, 62825fdd593SJeykumar Sankaran {.fl = 0, .lut = 0x112233344556677}, 62925fdd593SJeykumar Sankaran }; 63025fdd593SJeykumar Sankaran 6317bdc0c4bSKalyan Thota static const struct dpu_qos_lut_entry sc7180_qos_macrotile[] = { 6327bdc0c4bSKalyan Thota {.fl = 0, .lut = 0x0011223344556677}, 6337bdc0c4bSKalyan Thota }; 6347bdc0c4bSKalyan Thota 635f3af2d6eSRob Clark static const struct dpu_qos_lut_entry sc8180x_qos_macrotile[] = { 636f3af2d6eSRob Clark {.fl = 10, .lut = 0x0000000344556677}, 637f3af2d6eSRob Clark }; 638f3af2d6eSRob Clark 63994391a14SAngeloGioacchino Del Regno static const struct dpu_qos_lut_entry msm8998_qos_nrt[] = { 64094391a14SAngeloGioacchino Del Regno {.fl = 0, .lut = 0x0}, 64194391a14SAngeloGioacchino Del Regno }; 64294391a14SAngeloGioacchino Del Regno 643abda0d92SStephen Boyd static const struct dpu_qos_lut_entry sdm845_qos_nrt[] = { 64425fdd593SJeykumar Sankaran {.fl = 0, .lut = 0x0}, 64525fdd593SJeykumar Sankaran }; 64625fdd593SJeykumar Sankaran 6477bdc0c4bSKalyan Thota static const struct dpu_qos_lut_entry sc7180_qos_nrt[] = { 6487bdc0c4bSKalyan Thota {.fl = 0, .lut = 0x0}, 6497bdc0c4bSKalyan Thota }; 6507bdc0c4bSKalyan Thota 65125fdd593SJeykumar Sankaran /************************************************************* 652de7d480fSDmitry Baryshkov * Hardware catalog 65325fdd593SJeykumar Sankaran *************************************************************/ 65425fdd593SJeykumar Sankaran 6551c611c48SDmitry Baryshkov #include "catalog/dpu_3_0_msm8998.h" 6561c611c48SDmitry Baryshkov 657460c410fSDmitry Baryshkov #include "catalog/dpu_4_0_sdm845.h" 658460c410fSDmitry Baryshkov 65925035306SDmitry Baryshkov #include "catalog/dpu_5_0_sm8150.h" 66097e2c803SDmitry Baryshkov #include "catalog/dpu_5_1_sc8180x.h" 6619b6f4fedSMarijn Suijten #include "catalog/dpu_5_4_sm6125.h" 662f3af2d6eSRob Clark 6632f36168eSDmitry Baryshkov #include "catalog/dpu_6_0_sm8250.h" 664c9cd1552SDmitry Baryshkov #include "catalog/dpu_6_2_sc7180.h" 66501f2e9a7SDmitry Baryshkov #include "catalog/dpu_6_3_sm6115.h" 6663186acbaSKonrad Dybcio #include "catalog/dpu_6_4_sm6350.h" 6675ce22484SDmitry Baryshkov #include "catalog/dpu_6_5_qcm2290.h" 66827f0df03SKonrad Dybcio #include "catalog/dpu_6_9_sm6375.h" 66901f2e9a7SDmitry Baryshkov 670b8ece0c6SDmitry Baryshkov #include "catalog/dpu_7_0_sm8350.h" 671f0f2c32aSDmitry Baryshkov #include "catalog/dpu_7_2_sc7280.h" 672f0f2c32aSDmitry Baryshkov 673225978f4SDmitry Baryshkov #include "catalog/dpu_8_0_sc8280xp.h" 6749cc54793SDmitry Baryshkov #include "catalog/dpu_8_1_sm8450.h" 6759cc54793SDmitry Baryshkov 6769cc54793SDmitry Baryshkov #include "catalog/dpu_9_0_sm8550.h" 677