gallium/winsys: move {amdgpu,radeon_drm}_public.h contents into radeon_winsys.h

header file simplification

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15907>
This commit is contained in:
Marek Olšák 2022-04-12 19:11:11 -04:00 committed by Marge Bot
parent efac875b66
commit 11c462534b
11 changed files with 13 additions and 68 deletions

View File

@ -178,7 +178,6 @@ DRM_DRIVER_DESCRIPTOR_STUB(kmsro)
#ifdef GALLIUM_R300
#include "winsys/radeon_winsys.h"
#include "radeon/drm/radeon_drm_public.h"
#include "r300/r300_public.h"
static struct pipe_screen *
@ -197,7 +196,6 @@ DRM_DRIVER_DESCRIPTOR_STUB(r300)
#ifdef GALLIUM_R600
#include "winsys/radeon_winsys.h"
#include "radeon/drm/radeon_drm_public.h"
#include "r600/r600_public.h"
static struct pipe_screen *

View File

@ -26,8 +26,6 @@
#include "si_pipe.h"
#include "driver_ddebug/dd_util.h"
#include "gallium/winsys/amdgpu/drm/amdgpu_public.h"
#include "gallium/winsys/radeon/drm/radeon_drm_public.h"
#include "radeon_uvd.h"
#include "si_compute.h"
#include "si_public.h"

View File

@ -890,4 +890,15 @@ static inline int radeon_get_heap_index(enum radeon_bo_domain domain, enum radeo
return -1;
}
typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *,
const struct pipe_screen_config *);
/* These functions create the radeon_winsys instance for the corresponding kernel driver. */
struct radeon_winsys *
amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
radeon_screen_create_t screen_create);
struct radeon_winsys *
radeon_drm_winsys_create(int fd, const struct pipe_screen_config *config,
radeon_screen_create_t screen_create);
#endif

View File

@ -1,6 +1,5 @@
#include "target-helpers/drm_helper.h"
#include "target-helpers/inline_debug_helper.h"
#include "frontend/drm_driver.h"
#include "radeon/drm/radeon_drm_public.h"
#include "winsys/radeon_winsys.h"
#include "r300/r300_public.h"

View File

@ -1,6 +1,5 @@
#include "frontend/drm_driver.h"
#include "target-helpers/drm_helper.h"
#include "target-helpers/inline_debug_helper.h"
#include "radeon/drm/radeon_drm_public.h"
#include "winsys/radeon_winsys.h"
#include "r600/r600_public.h"

View File

@ -1,41 +0,0 @@
/*
* Copyright © 2015 Advanced Micro Devices, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
* AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*/
#ifndef AMDGPU_PUBLIC_H
#define AMDGPU_PUBLIC_H
#include "pipe/p_defines.h"
#include "gallium/winsys/radeon/drm/radeon_drm_public.h"
struct radeon_winsys;
struct pipe_screen;
struct pipe_screen_config;
struct radeon_winsys *
amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
radeon_screen_create_t screen_create);
#endif

View File

@ -28,7 +28,6 @@
*/
#include "amdgpu_cs.h"
#include "amdgpu_public.h"
#include "util/os_file.h"
#include "util/os_misc.h"

View File

@ -22,7 +22,7 @@ libamdgpuwinsys = static_library(
'amdgpuwinsys',
files(
'amdgpu_bo.c', 'amdgpu_bo.h', 'amdgpu_cs.c', 'amdgpu_cs.h',
'amdgpu_public.h', 'amdgpu_surface.c', 'amdgpu_winsys.c',
'amdgpu_surface.c', 'amdgpu_winsys.c',
'amdgpu_winsys.h',
),
include_directories : [

View File

@ -21,7 +21,7 @@
libradeonwinsys = static_library(
'radeonwinsys',
files('radeon_drm_bo.c', 'radeon_drm_bo.h', 'radeon_drm_cs.c',
'radeon_drm_cs.h', 'radeon_drm_public.h', 'radeon_drm_surface.c',
'radeon_drm_cs.h', 'radeon_drm_surface.c',
'radeon_drm_winsys.c', 'radeon_drm_winsys.h'),
include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
gnu_symbol_visibility : 'hidden',

View File

@ -1,17 +0,0 @@
#ifndef RADEON_DRM_PUBLIC_H
#define RADEON_DRM_PUBLIC_H
#include "pipe/p_defines.h"
struct radeon_winsys;
struct pipe_screen;
struct pipe_screen_config;
typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *,
const struct pipe_screen_config *);
struct radeon_winsys *
radeon_drm_winsys_create(int fd, const struct pipe_screen_config *config,
radeon_screen_create_t screen_create);
#endif

View File

@ -27,7 +27,6 @@
#include "radeon_drm_bo.h"
#include "radeon_drm_cs.h"
#include "radeon_drm_public.h"
#include "util/os_file.h"
#include "util/u_cpu_detect.h"