Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VA/X11: add crocus mapping #547

Merged
merged 1 commit into from
Nov 27, 2021
Merged

VA/X11: add crocus mapping #547

merged 1 commit into from
Nov 27, 2021

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Oct 31, 2021

Fixes intel/intel-vaapi-driver#533
Fixes #548
Closes #549 (duplicate)
Closes #550 (duplicate)
See https://gitlab.freedesktop.org/mesa/mesa/-/blob/21.3/include/pci_ids/crocus_pci_ids.h
Dogfooding via freebsd/freebsd-ports@bbdb8c12e8ac

Disclaimer: Runtime hasn't been tested. I only have Skylake where this is nop.

crocus supports Gen4 to Gen7.5, so only i965 can be used.
Copy link

@airlied airlied left a comment

Choose a reason for hiding this comment

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

Looks exactly like I did.

@kwizart
Copy link

kwizart commented Nov 12, 2021

Thanks for the update on this.

There is a little difference as the second parameter is the size of the DRI driver name or the VAAPI backend ?
Also I wonder if there is a need for the iHD driver mapping which seems mandatory for newer hw (at least on X11 and DRM)

So I've made yet another PR: #550

@jbeich
Copy link
Contributor Author

jbeich commented Nov 12, 2021

There is a little difference as the second parameter is the size of the DRI driver name or the VAAPI backend ?

Probably DRI due to how fields are named and used:

libva/va/x11/va_x11.c

Lines 47 to 51 in 453002c

struct driver_name_map {
const char *key;
int key_len;
const char *name;
};

libva/va/x11/va_x11.c

Lines 105 to 106 in 453002c

if (strlen(driver_name) >= m->key_len &&
strncmp(driver_name, m->key, m->key_len) == 0) {

libva/va/x11/va_x11.c

Lines 139 to 140 in 453002c

if (strlen(*driver_name_ptr) >= m->key_len &&
strncmp(*driver_name_ptr, m->key, m->key_len) == 0) {

Also I wonder if there is a need for the iHD driver mapping which seems mandatory for newer hw (at least on X11 and DRM)

iHD (media-driver) doesn't support GPUs supported by crocus (mesa). This is documented in the commit message and PR description.

@XinfengZhang
Copy link
Contributor

hi @jbeich not sure the platform that crocus support, it is pre-gen8 or pre-gen7.5?
and there are #549 #550 , they are for same purpose?

@jbeich
Copy link
Contributor Author

jbeich commented Nov 16, 2021

it is pre-gen8 or pre-gen7.5?

crocus supports what iris doesn't, filling the gap left by i965 (mesa, non-gallium) deprecation. According to PCI ID list in the PR description crocus does support Haswell (gen7.5).

@XinfengZhang
Copy link
Contributor

it is pre-gen8 or pre-gen7.5?

crocus supports what iris doesn't, filling the gap left by i965 (mesa, non-gallium) deprecation. According to PCI ID list in the PR description crocus does support Haswell (gen7.5).

sorry, I click the wrong button when I want to "quote reply" , not want to edit your comments, sorry about it.
if it just support the older platform before gen7.5, LGTM, thanks

@airlied
Copy link

airlied commented Nov 25, 2021

can this be merged?

@XinfengZhang XinfengZhang merged commit 906d70e into intel:master Nov 27, 2021
@jbeich jbeich deleted the crocus branch November 28, 2021 00:14
SupervisedThinking added a commit to SupervisedThinking/LibreELEC-RR that referenced this pull request Dec 24, 2021
SupervisedThinking added a commit to SupervisedThinking/LibreELEC-RR that referenced this pull request Dec 30, 2021
SupervisedThinking added a commit to SupervisedThinking/LibreELEC-RR that referenced this pull request Dec 30, 2021
@thetick1234567890
Copy link

Thanks! Can you please release a new official libva package as I'm hoping this gets in the 22.04 Ubuntu release.

@thetick1234567890
Copy link

@airlied
Any chance you can ask Oibaf to include this in his Mesa ppa ? Right now ppa users need to set LIBVA_DRIVER_NAME=i965 environment variable for a functional vaapi crocus driver.

In general I don't have connections to the developers. I'm just a user (former developer) who likes to tinker/test new functionally.

@FabioPedretti
Copy link

@airlied Any chance you can ask Oibaf to include this in his Mesa ppa ? Right now ppa users need to set LIBVA_DRIVER_NAME=i965 environment variable for a functional vaapi crocus driver.

In general I don't have connections to the developers. I'm just a user (former developer) who likes to tinker/test new functionally.

Current libva in the PPA is 2.13, which is also the latest official release. I'll update the PPA libva package when the new version including the patch will be released.

@thetick1234567890
Copy link

Thanks!! And another thanks for all your daily mesa ppa builds for over a decade! You have saved me countless hours of compile time over the years.

@FabioPedretti
Copy link

Just pushed libva 2.14 in the PPA ( https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers/+packages ). Enjoy and let me know! ;)
It's also included in Ubuntu 22.04 (no need to use the PPA).

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.

Fedora 35 - vaInitialize failed with error code -1 (unknown libva error),exit Crocus driver ?
6 participants