ChanServ changed the topic of #linux-msm to:
alexeymin has joined #linux-msm
alexeymin has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alexeymin has joined #linux-msm
marvin24 has joined #linux-msm
marvin24_ has quit [Ping timeout: 480 seconds]
jhovold has joined #linux-msm
Daanct12 has joined #linux-msm
pespin has joined #linux-msm
mort_2 has quit []
mort_2 has joined #linux-msm
<z3ntu> Hi, I'm trying to get displayport to work on sm6350 but hitting a weird issue regarding link clk frequency. For the requested link rate=540000 in dp_ctrl_enable_mainlink_clocks we call dev_pm_opp_set_rate with target_freq=540000000 (clk name: disp_cc_mdss_dp_link_clk) but the clk_round_rate there makes this into freq=810000 and subsequently qmp_dp_link_clk_determine_rate fails because that's not a valid frequency, only for example 810000000.
<z3ntu> Without any debug statements the visible error in kernel log is: "msm-dp-display ae90000.displayport-controller: _opp_config_clk_single: failed to set clock rate: -22"
<z3ntu> So somewhere there seems to be confusion between how many zeroes should be where.. But not sure how this is working on other SoCs, I don't see anything much different for my SoC
<z3ntu> Kernel base is 6.8.1 fwiw
<z3ntu> clk_round_rate behavior feels correct as ftbl_disp_cc_mdss_dp_link_clk_src lists the frequencies as 162000/270000/540000/810000 so it rounds it to the highest available frequency of the clock
mort_2 has quit []
mort_2 has joined #linux-msm
<strongtz[m]> krzk: Hi, I would like to get i2s codec working on 8550, but I wonder if that's even supported with the q6apm/audioreach stuff? I know Qualcomm reference designs don't usually utilize i2s interface.
Daanct12 has quit [Quit: WeeChat 4.2.1]
<krzk> strongtz[m]: I have never tried, don't know. There is I2S pin function for some of LPASS LPI pins, LPA IF should support I2S, WSA macro also has I2S, because we have like 4 or 5 instances of I2S
<krzk> This means they will be used differently than standard audio which we upstream.
<krzk> But I don
<krzk> I don't know what you need to do to use them.
<strongtz[m]> umm I see, thanks!
<z3ntu> Regarding what I was writing some hours ago with displayport clock issues, at least I'm guessing that's what causing this corruption on usb-c -> hdmi dongle. Or does anyone have an idea what else this could be? The picture issues are also flickering a bit fwiw
<travmurav[m]> Luca Weiss: what resolution this is? btw
<z3ntu> 1920x1200 I think
<travmurav[m]> I've seen similar issues on 2k on 7c1, fixed by https://lore.kernel.org/linux-arm-msm/20240220-fd-sc7180-explicit-ubwc-v1-1-611a58091724@linaro.org/ but not sure if this applies to "7c3" too
<travmurav[m]> but perhaps robclark would know better
<z3ntu> travmurav: oh you're thinking this might be a GPU issue, rather than a DisplayPort issue?
<travmurav[m]> Luca Weiss: not sure, but if when you open a window and it looks "sane" only on every 4th "line", then the visual bug is the same as what I saw before ^^ fix
<bamse> z3ntu: looks like ubwc to me...
<z3ntu> 800x600 resolution works :D
<z3ntu> The other resolutions that work: 1440x900, 1600x900, 1600x1200, 1680x1050. The rest has this flickering
<z3ntu> bamse: ubwc in GPU or DPU? I see the term in both?
<robclark> travmurav[m], strongtz[m]: https://patchwork.freedesktop.org/series/130137/
<robclark> well, assuming that is sc7180
<robclark> but yeah, somehow a mismatch btwn gpu and dpu ubwc settings
<z3ntu> My chip is SM6350/SM7225 with A619 GPU
<z3ntu> ok will deep dive into ubwc then and try to find the culprit
<z3ntu> So downstream lagoon-gpu.dtsi has qcom,highest-bank-bit = <14>; which is obviously different from the current default of 15 because it's not set. Setting it to 14 doesn't seem to change anything BUT setting it to 13 seems to fix everything! So it smells like https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a0dbcd20ef252ebf98af94186a2e53da7167bed ?
mripard has quit [Quit: mripard]
<robclark> maybe.. I guess if it works it works. But at least in some cases the value depends on the memory type (which we do not have a good way of handling)
<lumag> z3ntu, robclark strange, In msm_mdss.c sm6360 has HBB=1, which translates to 14.
<lumag> z3ntu, could you please try whether setting ubwc_static to 0xe or to 0x16 (with hbb = 1 / 14) fixes the issue?
<lumag> robclark, where do we calculate the size of UBWC planes?
<z3ntu> lumag: so ubwc_static=0xe + hbb=1 and a different try ubwc_static=0x16+hbb=14?
<z3ntu> Or what exactly do you mean?
<lumag> no, msm_mdsss / hbb = 1, a6xx_gpu, hbb = 14, then in msm_mdss ubwc_static = 0xe or 0x16
<z3ntu> We already have .highest_bank_bit = 1, in sm6350_data so I'll leave that be
<z3ntu> Same corruption with `gpu->ubwc_config.highest_bank_bit = 14;` + `.ubwc_static = 0xe,`
<z3ntu> Also with `gpu->ubwc_config.highest_bank_bit = 14;` + `.ubwc_static = 0x16,` :(
<z3ntu> lumag: anything else you want me to test?
<lumag> z3ntu, no ideas for now :-(
<z3ntu> ok thanks :)
<lumag> I don't have good reference for UBWC, so probably we can land your commit. I don't see anything else that might be wrong there.
<z3ntu> Do you think there are any side effects setting hbb=13?
<lumag> no
<robclark> lumag: the pitch of the ubwc meta data? src/freedreno/fdl/fd6_layout.c ... although https://chromium.googlesource.com/chromiumos/platform/minigbm/+/master/msm.c might be easier to look at (since it handles a lot fewer cases)
<robclark> re: mismatch btwn dpu and gpu hbb, I've seen that in a couple places, which is why I didn't get too far with my idea about global ubwc config table. My guess is just that we don't properly understand the dpu regs for the different generations of ubwc
<lumag> Hmm.
<lumag> z3ntu, so the issue only appears on 1920x1080? or with some other resolutions too?
<z3ntu> lumag: it's at least 5 resolutions that showed up in the Phosh/GNOME settings, some other ones inbetween did work (which I sent before)
<lumag> <z3ntu> The other resolutions that work: 1440x900, 1600x900, 1600x1200, 1680x1050. The rest has this flickering
<lumag> and also you mentioned 800x600
<lumag> any other that didn't work?
<lumag> robclark, I'm thinking whether using multirect + UBWC has this side-effect
<z3ntu> At least 1920x1200 and 1920x1080 had it, I'd need to test again to see what other resolutions had this problem
<robclark> hmm, not entirely sure why multirect would matter
<lumag> abhinav__, any ideas from your side ^^
<robclark> that isn't really about ubwc in particular but just tiled formats in general..
<robclark> not sure how it works out to 5 lines of buffering, I'd expect you'd want to buffer up entire rows of tiles
<lumag> robclark, z3ntu: I have compared the settings between upstream and downstream. They seem to match, maybe except the fast_clear setting.
<lumag> Upstream we set it depending on the format, while downstream sets it depending on the blend mode
<lumag> I'll check the formats / sizes later
pespin has quit [Remote host closed the connection]
jhovold has quit [Ping timeout: 480 seconds]
animist1 is now known as animist