From nobody Thu May 11 09:03:51 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QH5YL2gDnz49y5v for ; Thu, 11 May 2023 09:04:06 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from mail.flex-it.com.ua (mail.flex-it.com.ua [193.239.74.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QH5YJ3khrz3kbT for ; Thu, 11 May 2023 09:04:04 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of shuriku@shurik.kiev.ua designates 193.239.74.7 as permitted sender) smtp.mailfrom=shuriku@shurik.kiev.ua; dmarc=none Received: from [188.231.181.61] (helo=[10.2.1.109]) by mail.flex-it.com.ua with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1px2DM-0002hn-3l for freebsd-current@freebsd.org; Thu, 11 May 2023 12:03:56 +0300 Content-Type: multipart/alternative; boundary="------------J4CvPguOCv1tJlNoqWQmldf0" Message-ID: Date: Thu, 11 May 2023 12:03:51 +0300 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: CFT: fwget(8) To: freebsd-current@freebsd.org References: <20230511095909.2b4565365e0818fb20b08a8d@bidouilliste.com> Content-Language: uk-UA From: Oleksandr Kryvulia In-Reply-To: <20230511095909.2b4565365e0818fb20b08a8d@bidouilliste.com> X-Spamd-Result: default: False [-2.92 / 15.00]; NEURAL_HAM_LONG(-0.92)[-0.917]; NEURAL_HAM_SHORT(-0.91)[-0.907]; NEURAL_HAM_MEDIUM(-0.80)[-0.797]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:35297, ipnet:193.239.72.0/22, country:UA]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[shurik.kiev.ua]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QH5YJ3khrz3kbT X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------J4CvPguOCv1tJlNoqWQmldf0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 11.05.23 10:59, Emmanuel Vadot пише: > Hello, > > Recently I've adde the fwget(8) utility, see > https://cgit.freebsd.org/src/commit/?id=d198b8774d2cfb6f140893e1c6236af9e97d1497 > > The goal of this program is to scan the hardware and download the > needed firmwares, for now it only do that for Intel GPUs and recent AMD > GPUs (the one supported by amdgpu.ko). > > I'd like to know if I handled correctly the mapping between ids on > Intel and AMD GPUs (for i915kms and amdgpu drm module). > I'm pretty sure that Intel is correct but I could have messed up some > AMD ones. Also for some AMD GPUs you need two firmware generations and > it's hard to know by looking at the code. It would be good to fix any > bugs/miss-match before 14.0 > The best way to test if everything works is : > > 1/ pkg delete gpu-firmware-\* > 2/ (optional) pkg install drm-515-kmod/drm-510-kmod (if you had the > meta package drm-kmod installed it would have been removed in step 1) > 3/ fwget > 4/ kldload i915kms/amdgpu > > For i915kms just check dmesg for lines saying something like > "drmn0: successfully loaded firmware image ...", this means that > everything is correct for your hardware. > If you see a line like > "drmn0: could not load firmware image ..." > please open a PR on bugzilla with dmesg and pciconf -vl attached. > Note that firmware for i915kms are optional, they only help with power > management and suspend/resume. > > For amdgpu the driver will fail to attach and you will loose the > display if the firmwares aren't present so you will need to ssh into > the machine to check for similar lines like i915kms. > > Thanks, > Hi, for me it correctly detects needed package gpu-firmware-intel-kmod-kabylake, but not install it. Propposed fix: - pkg install -q ${package} + pkg install -qy ${package} --------------J4CvPguOCv1tJlNoqWQmldf0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 11.05.23 10:59, Emmanuel Vadot пише:
 Hello,

Recently I've adde the fwget(8) utility, see
https://cgit.freebsd.org/src/commit/?id=d198b8774d2cfb6f140893e1c6236af9e97d1497

 The goal of this program is to scan the hardware and download the
needed firmwares, for now it only do that for Intel GPUs and recent AMD
GPUs (the one supported by amdgpu.ko).

 I'd like to know if I handled correctly the mapping between ids on
Intel and AMD GPUs (for i915kms and amdgpu drm module).
 I'm pretty sure that Intel is correct but I could have messed up some
AMD ones. Also for some AMD GPUs you need two firmware generations and
it's hard to know by looking at the code. It would be good to fix any
bugs/miss-match before 14.0
 The best way to test if everything works is :

 1/ pkg delete gpu-firmware-\*
 2/ (optional) pkg install drm-515-kmod/drm-510-kmod (if you had the
meta package drm-kmod installed it would have been removed in step 1)
 3/ fwget
 4/ kldload i915kms/amdgpu

 For i915kms just check dmesg for lines saying something like 
 "drmn0: successfully loaded firmware image ...", this means that
everything is correct for your hardware.
 If you see a line like
 "drmn0: could not load firmware image ..."
 please open a PR on bugzilla with dmesg and pciconf -vl attached.
 Note that firmware for i915kms are optional, they only help with power
management and suspend/resume.

 For amdgpu the driver will fail to attach and you will loose the
display if the firmwares aren't present so you will need to ssh into
the machine to check for similar lines like i915kms.

 Thanks,


Hi,
for me it correctly detects needed package gpu-firmware-intel-kmod-kabylake, but not install it.
Propposed fix:

-
pkg install -q ${package}
+ pkg install -qy ${package} --------------J4CvPguOCv1tJlNoqWQmldf0--