Revert "v3d: use kmsro to create drm screen on real hw"

Let's not depend on kmsro to create the screen.

This reverts commit 8f621174da.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27001>
This commit is contained in:
Juan A. Suarez Romero 2024-01-11 11:55:17 +01:00 committed by Marge Bot
parent 4be49fa15a
commit 0557f0d59c
2 changed files with 3 additions and 36 deletions

View file

@ -18,25 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
dep_v3dv3 = dependency('v3dv3', required: false)
v3d_winsys_c_args = []
if with_gallium_kmsro
v3d_winsys_c_args += '-DGALLIUM_KMSRO'
endif
if (dep_v3dv3.found())
v3d_winsys_c_args += '-DUSE_V3D_SIMULATOR'
endif
libv3dwinsys = static_library(
'v3dwinsys',
files('v3d_drm_winsys.c'),
include_directories : [
inc_src, inc_include,
inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_gallium_winsys,
inc_gallium, inc_gallium_aux, inc_gallium_drivers,
],
c_args: [v3d_winsys_c_args],
gnu_symbol_visibility : 'hidden',
dependencies : idep_mesautil,
)

View file

@ -23,40 +23,19 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "util/os_file.h"
#include "util/u_screen.h"
#include "kmsro/drm/kmsro_drm_public.h"
#include "v3d_drm_public.h"
#include "v3d/v3d_screen.h"
#include "drm-uapi/v3d_drm.h"
struct pipe_screen *
v3d_drm_screen_create(int fd, const struct pipe_screen_config *config)
{
bool v3d_present = false;
#ifndef USE_V3D_SIMULATOR
struct drm_v3d_get_param ident0 = {
.param = DRM_V3D_PARAM_V3D_CORE0_IDENT0,
};
int ret = ioctl(fd, DRM_IOCTL_V3D_GET_PARAM, &ident0);
v3d_present = (ret != 0);
#endif
if (!v3d_present)
return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), config,
NULL, v3d_screen_create);
#ifdef GALLIUM_KMSRO
return kmsro_drm_screen_create(fd, config);
#endif
return NULL;
return u_pipe_screen_lookup_or_create(os_dupfd_cloexec(fd), config,
NULL, v3d_screen_create);
}
struct pipe_screen *