# Amd GPU



## BsDjUsTbSd (May 15, 2020)

Hello,

I recently got and AMD gpu. do i install mesa driver and what's the difference between it and `libva-mesa-driver` `mesa-vdpau`


----------



## shkhln (May 15, 2020)

Are you sure you are using FreeBSD? We don't have packages with these names. All existing packages have descriptions, which you can read on, say, freshports.


----------



## christhegeek (May 15, 2020)

BsDjUsTbSd said:


> Hello,
> 
> I recently got and AMD gpu. do i install mesa driver and what's the difference between it and `libva-mesa-driver` `mesa-vdpau`


Is it a new amd gpu ?    if its new it is supported by the drm-kmod* / amdgpu driver .   mesa-vdpau is for nvidia graphics cards, intel and amd gpus have vaapi hardware acceleration.

*1:  maybe its not that wise but i would go with drm-devel-kmod for my rx-580 just to be sure also for intel too...but this maybe stupid, try at first the drm-kmod


----------



## shkhln (May 15, 2020)

christhegeek said:


> mesa-vdpau is for nvidia graphics cards



Nothing in Mesa is for Nvidia cards.


----------



## BsDjUsTbSd (May 16, 2020)

Sorry for not making everything clear. the card is actually an rx 590 nitro+. thanks for the help guys


----------



## Alexander88207 (May 17, 2020)

If you install a desktop environment like xfce, mate etc... mesa (graphics/mesa-dri & graphics/mesa-libs) is already there, you only need to install  & setup graphics/drm-kmod and x11-drivers/xf86-video-amdgpu.


----------



## First_Law_of_Unix (Sep 24, 2022)

Do you need mesa drivers for making the AMD GPU work? Can we use the "amdgpu" driver instead of mesa? I ask since in linux there is amdgpu of two types, open source and proprietary.

OpenCL (from mesa which is clover) seems to be only version 1.1 for AMD GPU when my GPU supports OpenCL version 2.


----------



## Alexander88207 (Sep 24, 2022)

There are no proprietary drivers for FreeBSD from AMD. (AMDGPU-PRO)

BTW even if there would be provided, own packaged mesa libraries are still in use then.


----------



## Alain De Vos (Sep 24, 2022)

But what is vdpau ?


----------



## Alexander88207 (Sep 24, 2022)

Alain De Vos said:


> But what is vdpau ?



Video Decode and Presentation API for Unix.


----------



## First_Law_of_Unix (Sep 24, 2022)

Alain De Vos said:


> But what is vdpau ?


It’s an API which is used for hardware acceleration in decoding video media files of certain types using the correct ASIC decoder chips embedded into the GPU. The API is usually called from softwares like FFMPEG, VLC or gstreamer. I use VA-API (similar to vdpau) works great on FreeBSD, able to get full H.265 transcoding on AMD RX-580 GPU.


----------



## First_Law_of_Unix (Sep 24, 2022)

Alexander88207 said:


> There are no proprietary drivers for FreeBSD from AMD. (AMDGPU-PRO)
> 
> BTW even if there would be provided, own packaged mesa libraries are still in use then.



So on FreeBSD there are no “amdgpu” driver of the open source version provided by amd? Because in Linux you can either install “mesa” (not provided by amd) or the open source version of “amdgpu” (provided from amd).

I ask such question because I want to get the highest OpenCL version for the GPU since the AMD GPU I have natively supports OpenCL 2.0 but the OpenCL drivers written by mesa (which they call “clover” for amd opencl) is only supported up to version 1.1, I was thinking maybe the “amdgpu” driver written by amd might provide a higher version of OpenCL driver for the amd gpu (RX-580).


----------



## angry_vincent (Sep 24, 2022)

there is open-source driver for freebsd, provided by drm-kmod, called "amdgpu"


----------



## First_Law_of_Unix (Sep 24, 2022)

angry_vincent said:


> there is open-source driver for freebsd, provided by drm-kmod, called "amdgpu"



Thank you, this is what I expected. I hope this is a separate driver as to Mesa.

I’ll see if can get this to install on FreeBSD 13.1 for the RX-580. I hope the OpenCL driver that comes with it is greater than OpenCL 1.1 (which mesa provides for it’s clover OpenCL driver for amd gpus)


----------



## angry_vincent (Sep 24, 2022)

notice, that is this not native open source driver per se, id est written by AMD for FreeBSD, it is the one implemented with linuxkpi just the same way as intel i915kms. thus, certain things may not work? such as OpenCL but i only speculating on this very point.


----------



## Alexander88207 (Sep 24, 2022)

First_Law_of_Unix said:


> So on FreeBSD there are no “amdgpu” driver of the open source version provided by amd? Because in Linux you can either install “mesa” (not provided by amd) or the open source version of “amdgpu” (provided from amd).



I believe that you misunderstand something.

amdgpu is the drm driver while mesa is a library to work with amdgpu. (Between mesa and drm driver are other components on the way like libdrm and X server but this now only so briefly said.)


----------



## First_Law_of_Unix (Sep 25, 2022)

Alexander88207 said:


> I believe that you misunderstand something.



I only know for the fact that on Linux I can install either amdgpu or mesa and have a working GPU driver.

Have no idea how these drivers work down to the bit (which I would like to some day).

So to keep things clear, I do not need mesa drivers to have a working AMD GPU when installed “amdgpu” driver?

As mentioned by “angry_vincent”, it seems that the “amdgpu” driver which was written by AMD for Linux was ported to FreeBSD by devs.

I assume now the ported “amdgpu” driver is not maintained well like MESA and that the OpenCL version will be just as ancient.


----------



## Alexander88207 (Sep 25, 2022)

First_Law_of_Unix said:


> [1] So to keep things clear, I do not need mesa drivers to have a working AMD GPU when installed “amdgpu” driver?
> 
> [2] I assume now the ported “amdgpu” driver is not maintained well like MESA and that the OpenCL version will be just as ancient.



[1] You will need mesa drivers otherwise xorg or the apps to be precise cant use acceleration and you will have software rendering.

[2] Now you put that a little meanly. The drivers are not always up to date, but they are always being worked on.

Right now there is even a PR on the way for Linux drm 5.11 which brings early support for some RX 6xxx cards.


----------



## First_Law_of_Unix (Sep 25, 2022)

I guess I'll stick with MESA, thanks.


----------



## tyson (Sep 25, 2022)

First_Law_of_Unix said:


> I guess I'll stick with MESA, thanks.


Get yourself little more educated man and stop spreading wrong info. Xorg requires specific driver to get hardware acceleration. AMDGPU is required anyway so X can have 2d and 3d stuff working. It’s done same way on Linux.


----------



## First_Law_of_Unix (Sep 26, 2022)

tyson said:


> Get yourself little more educated man and stop spreading wrong info. Xorg requires specific driver to get hardware acceleration. AMDGPU is required anyway so X can have 2d and 3d stuff working. It’s done same way on Linux.


Exactly, that is what I was referring to regardless.

Please indicate where exactly I was explicitly "Spreading wrong info" on this thread (not to mention that I'm the OP asking questions to begin with ) ?

Before rudely accusing people, it seems you're the one who needs some education my friend:





						amdgpu man page - xorg-x11-drv-amdgpu - Special Files
					

AMD RADEON GPU video driver




					www.mankier.com
				






> _amdgpu is an Xorg driver for AMD RADEON-based video cards with the following features:
> 
> Support for 8-, 15-, 16-, 24- and 30-bit pixel depths;
> RandR support up to version 1.4;
> 3D acceleration;_



Since you seem to be more confused than me, you'll have a working DE without MESA if you install the GPU's proprietary drivers on Linux, (not sure if devs ported it to FreeBSD of the AMDGPU-PRO driver). MESA is not a GPU driver as you call it, it is used only at user space while MESA call's the AMDGPU kernel driver.
MESA is the open source implementation for the GPU's proprietary drivers.

For example MESA have VA-API for GPU acceleration in media transcoding and AMD's proprietary driver (AMDGPU-PRO) provides the AMD-AMF GPU acceleration in media transcoding. There are pros and cons to both MESA and AMDGPU-PRO, hence professional multimedia users installs both of them to get the job done for certain tasks.

Since you're hijacking my thread, I was asking about OpenCL, does your smart head knows anything about OpenCL at all? 
It seems that only the GPU's proprietary drivers contains OpenCL in which I wanted to know if it's better than MESA's Clover implementation of OpenCL since it's ancient locked at version 1.1. 

There is also the "ROCm" (_Radeon Open Compute platform) _which is AMD's latest and official implementation for all sorts of things including OpenCL.

This is really an extreme advanced discussion and do not expect you to know any of these highly complex materials. Go spread spam and troll else where, people are here to do work and research.


----------



## tyson (Sep 27, 2022)

First_Law_of_Unix said:


> Since you seem to be more confused than me, you'll have a working DE without MESA if you install the GPU's proprietary drivers on Linux, (not sure if devs ported it to FreeBSD of the AMDGPU-PRO driver). MESA is not a GPU driver as you call it, it is used only at user space while MESA call's the AMDGPU kernel driver.
> MESA is the open source implementation for the GPU's proprietary drivers.


That's why the confusion started.
My understanding of MESA was only as libs for OpenGL etc..
I don't follow this project that much to know if amdgpu driver is part of it or not. 
Anyway, AMD has nothing to do with FreeBSD, and there is no PRO drivers on FreeBSD (who knows what future bring).
So if you look for vendor drivers for radeon cards, you choose wrong platform.


----------

