Repository navigation
Fix garbled output on RB3gen2 with Linux >=7.3 & minor build script improvement - #22
Conversation
On Linux 7.3, Weston rendered by the Adreno proprietary userspace driver shows garbled output on qcm6490. The 7.3 UBWC config rework moved qcm6490/sc7280 to report ubwc_enc_version = UBWC_3_1 (UBWC 3.0 plus macrotile mode). On 7.2 the same SoC reported UBWC_3_0 with a separate macrotile_mode flag. ubwc_encoder_to_kgsl_mode() matched the encoder version exactly, so UBWC_3_1 fell through to KGSL_UBWC_NONE. That value is what KGSL_PROP_UBWC_MODE reports to userspace. UBWC_x_y encodes the version as major << 28 | minor << 16. Switch on the major version only, so minor revisions map to their major KGSL mode. For qcm6490 this restores KGSL_UBWC_3_0, which is what 7.2 reported. The existing case labels are used unchanged, so the code still builds against 6.17-7.2 headers. UBWC_6_0 stays under its 6.19 guard. Also log the encoder version and the resulting KGSL UBWC mode once at probe. A mismatch like this then shows up in dmesg. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
qcom_ubwc_config_get_data() returns an ERR_PTR on failure, never NULL: -EOPNOTSUPP when CONFIG_QCOM_UBWC_CONFIG is disabled, or an error when the SoC is not in the UBWC config table. adreno_init_ubwc() only checked for NULL, so it stored the error pointer and dereferenced it reading ubwc_enc_version. Check with IS_ERR_OR_NULL() instead. On error, ubwc_cfg_data stays NULL and the calc_ubwc_config() callers fall back to the legacy path as they already do for NULL. The API has returned a const pointer since 6.17, but kgsl stored it in a non-const pointer, which caused a "discards 'const' qualifier" warning. Make ubwc_cfg_data const and drop the casts that removed const in the a6xx, gen7 and gen8 consumers. They only read through the pointer, and the qcom_ubwc_*() helpers already take a const pointer. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Qualcomm AI ReviewClick to expand Deep Code ReviewWe encountered an unexpected issue while reviewing your pull request. What you can do:
We apologize for the inconvenience. |
|
Appreciate the report and the suggested fix. We're already completed working on the corresponding changes internally, and the fix should land in the repo soon |
Hi bvalluru12 - do you have any rough timeline for the fix to be released? I am also wondering if we should improve the process for reporting these kinds of bugs (both from your team and ours), so in future we don't have any duplicated work. Thanks! |
Hi,
This patch fixes a garbled screen on RB3gen2 with Linux >=7.3
See qualcomm-linux/qcom-deb-images#740 for more information.