narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
mgonzalez has quit [Ping timeout: 255 seconds]
vagrantc has quit [Quit: leaving]
jacobk has quit [Ping timeout: 240 seconds]
montjoie has quit [Ping timeout: 264 seconds]
montjoie has joined #linux-amlogic
vagrantc has joined #linux-amlogic
vagrantc has quit [Quit: leaving]
buzzmarshall has quit [Quit: Konversation terminated!]
hexdump0815 has quit [Ping timeout: 256 seconds]
hexdump0815 has joined #linux-amlogic
naoki1 has joined #linux-amlogic
jacobk has joined #linux-amlogic
naoki has quit [Ping timeout: 264 seconds]
naoki1 is now known as naoki
luka177 has quit [Ping timeout: 252 seconds]
luka177 has joined #linux-amlogic
jacobk has quit [Ping timeout: 240 seconds]
jacobk has joined #linux-amlogic
naoki has quit [Quit: naoki]
naoki has joined #linux-amlogic
dliviu has quit [Ping timeout: 268 seconds]
dliviu has joined #linux-amlogic
djrscally has joined #linux-amlogic
<narmstrong> oh you use vendor u-boot :-/
ldevulder has quit [Quit: Leaving]
ldevulder has joined #linux-amlogic
naoki has quit [Ping timeout: 246 seconds]
naoki has joined #linux-amlogic
naoki has quit [Remote host closed the connection]
naoki has joined #linux-amlogic
naoki has quit [Quit: naoki]
naoki has joined #linux-amlogic
naoki has quit [Client Quit]
psydroid has joined #linux-amlogic
jacobk has quit [Ping timeout: 260 seconds]
buzzmarshall has joined #linux-amlogic
<marc|gonzalez> narmstrong: can I ask your opinion on the approach for supporting loading VDEC FW from secure OS?
<marc|gonzalez> Very preliminary, WIP, proof-of-concept, quick&dirty, #include <std_disclaimers>
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
<narmstrong> marc|gonzalez: ok I dislike the global meson_secure_boot variable, so I think you should:
<narmstrong> 1) add the secure boot info to the SoC ID string like: "S905X2 (4) secure"
<narmstrong> 2) use soc_device_match to match against something like we do here https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/meson/meson_drv.c#L279
<narmstrong> in vdec probe, just run soc_device_match(), it it matches soc_id "* secure" then you can set a vdec flag as secure boot
ungeskriptet has quit [Quit: Ping timeout (120 seconds)]
ungeskriptet has joined #linux-amlogic
ungeskriptet6 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 260 seconds]
ungeskriptet6 is now known as ungeskriptet
jacobk has joined #linux-amlogic
<marc|gonzalez> narmstrong: if I have the struct device *dev from core->dev_dec, can't I just use a container_of() to get the englobing struct soc_device, and use its attr->data field to store a flag or a struct?
<marc|gonzalez> I see that your suggestion is to tweak the soc_dev_attr->soc_id string
<narmstrong> it aligns how soc_device_match() is meant to be used, other means is abusing the api
<marc|gonzalez> narmstrong: would the "secure" property be a field of 'struct vdec_platform' ?
<marc|gonzalez> or 'struct amvdec_core' instead? (not sure at which level to squeeze the info)
<narmstrong> yes amvdec_core instead
ungeskriptet has quit [Quit: Ping timeout (120 seconds)]
ungeskriptet has joined #linux-amlogic
jacobk has quit [Ping timeout: 240 seconds]
<marc|gonzalez> doc says @dev: core device & @dev_dec: decoder device but code apparently does core->dev = dev; core->dev_dec = dev;
jacobk has joined #linux-amlogic
luka177 has quit [Ping timeout: 272 seconds]
Terry13732293409 has quit [Ping timeout: 264 seconds]
ungeskriptet9 has joined #linux-amlogic
<marc|gonzalez> narmstrong: is this what you had in mind? https://paste.debian.net/1308253/
<marc|gonzalez> but this does not scale well if other platforms are secure.
<marc|gonzalez> Shouldn't we instead use the data field to pass the is_secure information, and any platform can define that flag?
ungeskriptet has quit [Ping timeout: 240 seconds]
ungeskriptet9 is now known as ungeskriptet
<marc|gonzalez> errr wait, that diff is missing key parts, same player shoot again
<narmstrong> in this case add the supported SoCs in the filter
<narmstrong> add like "GXL (*) secure" for example to only allow detecting secure on GXL
<marc|gonzalez> Can we just scan for "secure" ?
<marc|gonzalez> hmmm, I see it expects a NULL terminated array, so that's bug 1
<marc|gonzalez> oh I see it calls glob_match()
<marc|gonzalez> So ".* (.) secure" ? brrr that's ugly
<marc|gonzalez> narmstrong: this is your preferred solution?
<marc|gonzalez> My regex is wrong, it's Shell-style pattern matching
<marc|gonzalez> So "*secure" should do the trick :)
<marc|gonzalez> Quickly spinning an informal pastebin patch v3 :p
<narmstrong> Anything not linking bith drivers is my preffered solution, and the soc_device_match() was designed for that exact purpose
<f_> am setting up my bpi-cm4 with an actually good OS :)
<f_> A311D, just like the alta I have
<f_> I'll focus mainly on g12b, then port to sm1. Should be very similar.
<narmstrong> yes sm1 should work the same
<marc|gonzalez> narmstrong: we could check for the secure bit directly in the vdec driver? :)
<marc|gonzalez> but we would have to provide a handle to the correct regmap
<narmstrong> marc|gonzalez: well, yes and no, you could add a phandle to the syscon where the registers are, but I would prefer not
<narmstrong> so first I think adding a simple amlogic,fw-secure-boot would be enough
<f_> narmstrong: knew it!!1!
<narmstrong> the device would need to have such property on the vdec dt
<narmstrong> when at some point we could think about a way to autodect secure boot
<marc|gonzalez> Ah! So a static DT prop would be acceptable at first?
<marc|gonzalez> narmstrong: also, random question: if I do add " secure" at the end of the soc_id string, would that not break all drivers that look for an explicit "S905X2 (4)" string to match?
<marc|gonzalez> narmstrong: about the actual meat of the patch, is the SMC call acceptable as proposed?
jacobk has quit [Ping timeout: 268 seconds]
<narmstrong> marc|gonzalez: good point, but we can fix the other drivers (there's only one...)
<narmstrong> marc|gonzalez: for the SMC call side, I think it's ok
<marc|gonzalez> phh raised a good point: there is necessarily a dependence between vdec & socinfo if vdec needs socinfo to determine BEFORE the trusted OS bit...
<marc|gonzalez> if we probe the 2 drivers concurrently, bad things will happen
<marc|gonzalez> (TM)(C)(R)
vagrantc has joined #linux-amlogic
nashpa has joined #linux-amlogic
dliviu has quit [Ping timeout: 255 seconds]
ungeskriptet6 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 268 seconds]
ungeskriptet6 has quit [Client Quit]
ungeskriptet has joined #linux-amlogic
luka177 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 260 seconds]
ungeskriptet has joined #linux-amlogic
ungeskriptet3 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 260 seconds]
ungeskriptet3 is now known as ungeskriptet
ungeskriptet3 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 268 seconds]
ungeskriptet3 is now known as ungeskriptet
ungeskriptet has quit [Client Quit]
ungeskriptet has joined #linux-amlogic
mripard has quit [Remote host closed the connection]
ungeskriptet6 has joined #linux-amlogic
ungeskriptet has quit [Ping timeout: 246 seconds]
ungeskriptet6 has quit [Client Quit]
ungeskriptet has joined #linux-amlogic
ungeskriptet has quit [Client Quit]
luka177 has quit [Ping timeout: 255 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
hays has quit [Remote host closed the connection]
<minute> uh oh > [ 10.827152] amlogic-canvas ff638048.video-lut: No more canvas available
anessen9733 has joined #linux-amlogic
hays has joined #linux-amlogic
hays has quit [Client Quit]
hays has joined #linux-amlogic
luka177 has quit [Ping timeout: 252 seconds]
anessen9733 has quit [Quit: The Lounge - https://thelounge.chat]
anessen9733 has joined #linux-amlogic
<minute> hmm, on g12b, what is the dsi transceiver bridge? (next_bridge in meson_encoder_dsi)
<minute> mhm dpi_port: port@2
<minute> remote-endpoint = <&mipi_dsi_in>;
<minute> ok so that _is_ amlogic,meson-g12a-dw-mipi-dsi
<minute> i can see that that probes
<minute> but why [ 4.373160] meson-drm ff900000.vpu: Failed to find DSI transceiver bridge
<minute> oh, we don't have a case for dw_mipi_dsi_phy_get_timing
<minute> hmm well we have default:
luka177 has joined #linux-amlogic
djrscally has quit [Ping timeout: 240 seconds]
<minute> omg it works
<minute> panel has to be subnode of &mipi_dsi
<minute> (i'm bringing up bpi/a311d in pocket reform)
<f_[xmpp]> yay
<minute> display works but it's horizontally offset and colors are wrong, looks like red and blue swapped maybe
<minute> or rotated
<minute> it looks like we need to maybe find a new set of values for data_lp2hs, data_hs2lp etc
<minute> this display is physically 1200x1920
<minute> cc narmstrong if you have any ideas
<minute> if i use the timing->clk_lp2hs = 37 set of values, the colors are right but the display is extremely stretched vertically :D
<minute> aha, almost good now with slower dsi hs clock
<minute> now there's only the horizontal offset/wrap, resolution and color seems good
adamg_ has quit [Quit: Connection closed for inactivity]
adamg_ has joined #linux-amlogic
psydroid has quit [Remote host closed the connection]
<minute> the progress for tonight https://mastodon.social/@mntmn/111977681918067563
jacobk has joined #linux-amlogic