freebsd / drm-kmod

drm driver for FreeBSD
155 stars 69 forks source link

Disable HDCP on green_sardine and renoir #172

Closed ivan-volnov closed 2 years ago

ivan-volnov commented 2 years ago

Disable HDCP on green_sardine

A quick fix for #167

ivan-volnov commented 2 years ago

@evadot @wulf7 Please have a look at the PR.

It solves the described issue for me. Hope you'll accept it as a temporary fix of the bug and update the port.

asas1asas200 commented 2 years ago

Thanks this PR, I haved test it on my R7-5800U(green sardine), and it worked well.

ivan-volnov commented 2 years ago

Thanks this PR, I haved test it on my R7-5800U(green sardine), and it worked well.

I'm glad that it helped you, so it really works.

asas1asas200 commented 2 years ago

Yes, but the origin drm module can work on 14-CURRENT, maybe we can try to find out which kernel change cause this error?

And my FreeBSD version is 13.1-RELEASE now.

wulf7 commented 2 years ago

Yes, but the origin drm module can work on 14-CURRENT, maybe we can try to find out which kernel change cause this error?

And my FreeBSD version is 13.1-RELEASE now.

Do you mean that R7-5800U(green sardine) works for you on CURRENT "as is" but fails on 13.1-RELEASE?

asas1asas200 commented 2 years ago

Yes, but the origin drm module can work on 14-CURRENT, maybe we can try to find out which kernel change cause this error? And my FreeBSD version is 13.1-RELEASE now.

Do you mean that R7-5800U(green sardine) works for you on CURRENT "as is" but fails on 13.1-RELEASE?

Yes. I test it about 2-3 weeks ago.

evadot commented 2 years ago

I'm not too fond of this patch. I'd really like to know if the problem is on all green_sardine or only the ones for which we backported the pciids.

nkfilis commented 2 years ago

is that only fixing green_sardine? I have the same issue (modeset(0): failed to set mode: Cannot allocate memory) with a renoir GPU (Ryzen 7 4800U) on -CURRENT

wulf7 commented 2 years ago

@evadot @wulf7 Please have a look at the PR.

It solves the described issue for me. Hope you'll accept it as a temporary fix of the bug and update the port.

It is better unconditionally ifdef-out whole HDCP firmware loading block. We do not support HDCP in drm-kmod yet

ivan-volnov commented 2 years ago

It is better unconditionally ifdef-out whole HDCP firmware loading block. We do not support HDCP in drm-kmod yet

@wulf7 Ok, updated the PR.

@nkfilis Please test it on renoir. It should work now.

nkfilis commented 2 years ago

@nkfilis Please test it on renoir. It should work now.

@ivan-volnov thank you, but unfortunately, the problem persists :(

ivan-volnov commented 2 years ago

@nkfilis Are you sure? It hasn't built until now. Fixed.

nkfilis commented 2 years ago

@nkfilis Are you sure? It hasn't built until now. Fixed.

yes, I grabbed https://raw.githubusercontent.com/freebsd/drm-kmod/b3e6bb4d0a22e8c527e95afc4b0e261622b208b0/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c after you asked, but still no dice. :(

Though it did build for me before after 982c604bc29ceb2bfab35852aac5aa5481985b69 as well.

ivan-volnov commented 2 years ago

@nkfilis Can you also try to merge the PR to the branch up to this 78361271cb8cfb758cccfdf911a0a19d3956ca9b commit? It works for me perfectly.

Also the error 'Cannot allocate memory' can be because of low GPU memory. Try to increase VRAM in BIOS.

ivan-volnov commented 2 years ago

Yes, but the origin drm module can work on 14-CURRENT, maybe we can try to find out which kernel change cause this error?

Yes. I test it about 2-3 weeks ago.

There was no kernel changes that caused the error. The driver was changed during these 2-3 weeks a lot. I also used old driver and it worked well for me. Now this PR fixes it on branch 5.10-lts.

@asas1asas200 so, this PR works for you too isn't it?

nkfilis commented 2 years ago

Also the error 'Cannot allocate memory' can be because of low GPU memory. Try to increase VRAM in BIOS.

I can only increase it to 1024M and it worked with 512MB with 5.7.

nkfilis commented 2 years ago

@nkfilis Can you also try to merge the PR to the branch up to this 7836127 commit? It works for me perfectly.

It works! Thank you very much! Haven't tried setting VRAM back to 512MB, but it does work with 1024MB

asas1asas200 commented 2 years ago

There was no kernel changes that caused the error. The driver was changed during these 2-3 weeks a lot. I also used old driver and it worked well for me. Now this PR fixes it on branch 5.10-lts.

@asas1asas200 so, this PR works for you too isn't it?

Yes, thanks for tracing the recent commits.

wulf7 commented 2 years ago

Please drop last #elif defined(__FreeBSD__) as it defines an empty block. Comment is not required here as it duplicates another one several lines before.

Also squash all your commits in single one and force push them after than

ivan-volnov commented 2 years ago

@wulf7 Done.

wulf7 commented 2 years ago

Thanks!