ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Konstantin Lepikhov <lakostis@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] Q: libva feedback
Date: Fri, 13 Oct 2017 15:01:41 +0200
Message-ID: <20171013130141.GA2112@lks.home> (raw)
In-Reply-To: <3e08395d-aa71-de93-654c-6c5715e8580d@basealt.ru>

Hi Anton!

On 10/13/2017, at 03:46:25 PM you wrote:

> 13.10.2017 15:32, Konstantin Lepikhov пишет:
> > Hi Anton!
> >
> > On 10/13/2017, at 02:35:32 PM you wrote:
> >
> >> Я всегда проверяю libva на железе перед отправкой на связке ffmpeg+vlc.
> >>
> >> Что там за неправильный merge ?
> >>
> > <skip>
> > http://git.altlinux.org/people/lakostis/packages/?p=libva.git;a=blobdiff;f=va/va.c;h=d4c188f66d4d0494ab84988a4442c0b2dece955d;hp=7f027dd8d812b53e41835fd094a9b903daad0e76;hb=a620ea1ba8a174cbf2c699b763a8ac0bf796c2c4;hpb=39a559e6e117f0d6aae62a0e541544a36a19caed
> >
> > @@ -648,8 +648,6 @@ VAStatus vaInitialize (
> > ...
> >
> > Насколько я помню из своего патча для /etc/libva.conf, там не должно быть
> > повторного вызова getenv, поскольку значение LIBVA_DRIVER_NAME будет null
> > если переменнная окружения не задана и это значение перепишет предыдущее
> > из /etc/libva.conf
> >
> > см. va/va.c:
> >
> >    59 /*
> >    60  * read a config "env" for libva.conf or from environment setting
> >    61  * libva.conf has higher priority
> >    62  * return 0: the "env" is set, and the value is copied into env_value
> >    63  *        1: the env is not set
> >    64  */
> >    65 int va_parseConfig(char *env, char *env_value)
> >
> Сейчас насколько я вижу это всё работает так, что через переменную 
> окружения LIBVA_DRIVER_NAME вообще невозможно переопределить драйвер. 
> Только через конфигурационный файл.
> 
> Повторного вызова getenv нет, как и первого.
> Твой коммит :
> http://git.altlinux.org/gears/l/libva.git?p=libva.git;a=commitdiff;h=722acba63ea18ba7daee32fa8af76666b73a83b7
> 
> вносит такое поведение и в этом месте никаких изменений больше не было.
> 
> Но  сейчас вполне нормально работает автоугадав и такое поведение меня лично вполне устраивает (возможность переопределять драйвер через конфиг), хотя и расходится с поведением апстрима.
> 
не, немного не так: va_parseConfig умеет проверять переменные окружения и
если значения нет в конфиге, то используется env (read a config "env" for
libva.conf _or_ from environment setting).

Этот функционал у нас добавлен, в апстриме его нет, но, похоже, моя ошибка
вообще связана с другой проблемой. У меня не xorg, а wayland сессия и она
определяется неправильно libva модулями:

$ LIBVA_DRIVER_NAME=i965 LIBVA_MESSAGING_LEVEL=2 vainfo
--display x11
libva info: VA-API version 1.0.0
libva info: Got driver name (null)
libva info: va_getDriverName() returns -1
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva error: /usr/lib64/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Вот что делает chromium/kodi, они задают тип экрана как x11 вместо
drm/wayland

Если задать все правильно, то драйвер загружается как надо:

$ LIBVA_DRIVER_NAME=i965 LIBVA_MESSAGING_LEVEL=2 vainfo --display drm
libva info: VA-API version 1.0.0
libva info: Got driver name i965
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0.pre2)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.0.0.pre2 (2.0.0.pre2)
...

(на версии можно не смотреть, я просто играюсь с 2.0.0).

-- 
WBR et al.


  reply	other threads:[~2017-10-13 13:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:36 Konstantin Lepikhov
2017-10-13 11:13 ` Sergey Bolshakov
2017-10-13 11:35 ` Anton Farygin
2017-10-13 12:32   ` Konstantin Lepikhov
2017-10-13 12:46     ` Anton Farygin
2017-10-13 13:01       ` Konstantin Lepikhov [this message]
2017-10-13 13:05         ` Anton Farygin
2017-10-13 13:20           ` Konstantin Lepikhov
2017-10-13 13:25             ` Anton Farygin
2017-10-13 14:09               ` Konstantin Lepikhov
2017-10-13 16:52                 ` Anton Farygin
2017-10-23 10:52           ` Konstantin Lepikhov
2017-10-23 11:38             ` Anton Farygin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171013130141.GA2112@lks.home \
    --to=lakostis@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git