mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Create amdgpu_master_screen helper
Preparatory, no functional change intended yet. (Ported from radeon commit 7f0cd68d1b0c132e32ae736371bce3e12ed33c7a) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
6b376c8d73
commit
19672625df
@@ -171,6 +171,15 @@ typedef enum {
|
||||
#define amdgpu_is_gpu_screen(screen) (screen)->isGPU
|
||||
#define amdgpu_is_gpu_scrn(scrn) (scrn)->is_gpu
|
||||
|
||||
static inline ScreenPtr
|
||||
amdgpu_master_screen(ScreenPtr screen)
|
||||
{
|
||||
if (screen->current_master)
|
||||
return screen->current_master;
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
static inline ScreenPtr
|
||||
amdgpu_dirty_master(PixmapDirtyUpdatePtr dirty)
|
||||
{
|
||||
@@ -180,10 +189,7 @@ amdgpu_dirty_master(PixmapDirtyUpdatePtr dirty)
|
||||
ScreenPtr screen = dirty->src->drawable.pScreen;
|
||||
#endif
|
||||
|
||||
if (screen->current_master)
|
||||
return screen->current_master;
|
||||
|
||||
return screen;
|
||||
return amdgpu_master_screen(screen);
|
||||
}
|
||||
|
||||
static inline Bool
|
||||
|
||||
Reference in New Issue
Block a user