Skip to content

Conversation

@konradybcio
Copy link
Contributor

SDM630 (and by extension 636/660 and probably 8998) don't
seem to have a working UBWC version register, but the UBWC
version is already specified in the DT and then read out
by SDE, so let's make use of that instead.


Please test on tama/kumano!

dmesg | sed 3000q | grep -i uwbc

should return nothing. In case it returns

Unsupported UBWC version 0xsomenumber

please paste the output here so that I can fix it up.

SDM630 (and by extension 636/660 and probably 8998) don't
seem to have a working UBWC version register, but the UBWC
version is already specified in the DT and then read out
by SDE, so let's make use of that instead.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
@konradybcio konradybcio changed the title drm/msm/sde: sde_hw_top: Fix UBWC version detection for SDM630 [7.1.r1] drm/msm/sde: sde_hw_top: Fix UBWC version detection for SDM630 Dec 14, 2020
c.blk_off = 0x0;
ubwc_version = SDE_REG_READ(&c, UBWC_DEC_HW_VERSION);
/* 630 doesn't seem to have the UBWC version register */
//ubwc_version = SDE_REG_READ(&c, UBWC_DEC_HW_VERSION);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove the line instead of commenting it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought keeping it for reference is okay, newer platforms have this feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is WIP code. The original below reads both the register in ubwc_version and what was stored in DT as m->ubwc_version. Seems like it's done on purpose, I doubt this is correct. @konradybcio What do they do on mainline?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, we can see in drivers/gpu/drm/msm/sde/sde_hw_catalog.h:

* @ubwc_version UBWC feature version (0x0 for not supported)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarijnS95 on mainline the version is hardcoded per platform.

@konradybcio konradybcio marked this pull request as draft December 14, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants