<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]
<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