mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
Merge branch '20260507-ubwc-rework-v4-4-c19593d20c1d@oss.qualcomm.com' into drivers-for-7.2
Merge the initial set of UBWC rework through a topic branch, to allow it being shared with the DRM/MSM branch for the continuation.
This commit is contained in:
commit
51c4071888
|
|
@ -50,6 +50,7 @@ struct qcom_ubwc_cfg_data {
|
|||
#define UBWC_1_0 0x10000000
|
||||
#define UBWC_2_0 0x20000000
|
||||
#define UBWC_3_0 0x30000000
|
||||
#define UBWC_3_1 0x30010000 /* UBWC 3.0 + Macrotile mode */
|
||||
#define UBWC_4_0 0x40000000
|
||||
#define UBWC_4_3 0x40030000
|
||||
#define UBWC_5_0 0x50000000
|
||||
|
|
@ -99,4 +100,25 @@ static inline u32 qcom_ubwc_swizzle(const struct qcom_ubwc_cfg_data *cfg)
|
|||
return cfg->ubwc_swizzle;
|
||||
}
|
||||
|
||||
static inline u32 qcom_ubwc_version_tag(const struct qcom_ubwc_cfg_data *cfg)
|
||||
{
|
||||
if (cfg->ubwc_enc_version >= UBWC_6_0)
|
||||
return 5;
|
||||
if (cfg->ubwc_enc_version >= UBWC_5_0)
|
||||
return 4;
|
||||
if (cfg->ubwc_enc_version >= UBWC_4_3)
|
||||
return 3;
|
||||
if (cfg->ubwc_enc_version >= UBWC_4_0)
|
||||
return 2;
|
||||
if (cfg->ubwc_enc_version >= UBWC_3_0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool qcom_ubwc_enable_amsbc(const struct qcom_ubwc_cfg_data *cfg)
|
||||
{
|
||||
return cfg->ubwc_enc_version >= UBWC_3_0;
|
||||
}
|
||||
|
||||
#endif /* __QCOM_UBWC_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user