Skip to content

Commit 040bf2a

Browse files
committed
Merge tag 'drm-misc-next-fixes-2021-12-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
Short summary of fixes pull: * bridge/lvds: Fix DT bindings * vmwgfx: Fix several issues with the recent conversion to GEM Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 4817c37 + 5da8b49 commit 040bf2a

File tree

9 files changed

+33
-237
lines changed

9 files changed

+33
-237
lines changed

Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,31 +94,32 @@ properties:
9494

9595
power-supply: true
9696

97-
if:
98-
not:
99-
properties:
100-
compatible:
101-
contains:
102-
const: lvds-decoder
103-
then:
104-
properties:
105-
ports:
97+
allOf:
98+
- if:
99+
not:
100+
properties:
101+
compatible:
102+
contains:
103+
const: lvds-decoder
104+
then:
106105
properties:
107-
port@0:
106+
ports:
108107
properties:
109-
endpoint:
108+
port@0:
110109
properties:
111-
data-mapping: false
110+
endpoint:
111+
properties:
112+
data-mapping: false
112113

113-
if:
114-
not:
115-
properties:
116-
compatible:
117-
contains:
118-
const: lvds-encoder
119-
then:
120-
properties:
121-
pclk-sample: false
114+
- if:
115+
not:
116+
properties:
117+
compatible:
118+
contains:
119+
const: lvds-encoder
120+
then:
121+
properties:
122+
pclk-sample: false
122123

123124
required:
124125
- compatible

drivers/gpu/drm/vmwgfx/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_hashtab.o vmwgfx_kms.o vmwgfx_d
1313
vmwgfx_gem.o
1414

1515
vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o
16-
vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o
1716

1817
obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o

drivers/gpu/drm/vmwgfx/vmwgfx_bo.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,12 @@ static int vmw_user_bo_synccpu_release(struct drm_file *filp,
568568
struct vmw_buffer_object *vmw_bo;
569569
int ret = vmw_user_bo_lookup(filp, handle, &vmw_bo);
570570

571-
if (!(flags & drm_vmw_synccpu_allow_cs)) {
572-
atomic_dec(&vmw_bo->cpu_writers);
571+
if (!ret) {
572+
if (!(flags & drm_vmw_synccpu_allow_cs)) {
573+
atomic_dec(&vmw_bo->cpu_writers);
574+
}
575+
ttm_bo_put(&vmw_bo->base);
573576
}
574-
ttm_bo_put(&vmw_bo->base);
575577

576578
return ret;
577579
}

drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -701,23 +701,15 @@ static int vmw_dma_masks(struct vmw_private *dev_priv)
701701
static int vmw_vram_manager_init(struct vmw_private *dev_priv)
702702
{
703703
int ret;
704-
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
705-
ret = vmw_thp_init(dev_priv);
706-
#else
707704
ret = ttm_range_man_init(&dev_priv->bdev, TTM_PL_VRAM, false,
708705
dev_priv->vram_size >> PAGE_SHIFT);
709-
#endif
710706
ttm_resource_manager_set_used(ttm_manager_type(&dev_priv->bdev, TTM_PL_VRAM), false);
711707
return ret;
712708
}
713709

714710
static void vmw_vram_manager_fini(struct vmw_private *dev_priv)
715711
{
716-
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
717-
vmw_thp_fini(dev_priv);
718-
#else
719712
ttm_range_man_fini(&dev_priv->bdev, TTM_PL_VRAM);
720-
#endif
721713
}
722714

723715
static int vmw_setup_pci_resources(struct vmw_private *dev,

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,8 @@
5959
#define VMWGFX_DRIVER_MINOR 20
6060
#define VMWGFX_DRIVER_PATCHLEVEL 0
6161
#define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
62-
#define VMWGFX_MAX_RELOCATIONS 2048
63-
#define VMWGFX_MAX_VALIDATIONS 2048
6462
#define VMWGFX_MAX_DISPLAYS 16
6563
#define VMWGFX_CMD_BOUNCE_INIT_SIZE 32768
66-
#define VMWGFX_ENABLE_SCREEN_TARGET_OTABLE 1
6764

6865
#define VMWGFX_PCI_ID_SVGA2 0x0405
6966
#define VMWGFX_PCI_ID_SVGA3 0x0406
@@ -1564,11 +1561,6 @@ void vmw_bo_dirty_unmap(struct vmw_buffer_object *vbo,
15641561
vm_fault_t vmw_bo_vm_fault(struct vm_fault *vmf);
15651562
vm_fault_t vmw_bo_vm_mkwrite(struct vm_fault *vmf);
15661563

1567-
/* Transparent hugepage support - vmwgfx_thp.c */
1568-
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
1569-
extern int vmw_thp_init(struct vmw_private *dev_priv);
1570-
void vmw_thp_fini(struct vmw_private *dev_priv);
1571-
#endif
15721564

15731565
/**
15741566
* VMW_DEBUG_KMS - Debug output for kernel mode-setting

drivers/gpu/drm/vmwgfx/vmwgfx_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void vmw_bo_print_info(int id, struct vmw_buffer_object *bo, struct seq_f
227227
break;
228228
}
229229

230-
seq_printf(m, "\t\t0x%08x: %12ld bytes %s, type = %s",
230+
seq_printf(m, "\t\t0x%08x: %12zu bytes %s, type = %s",
231231
id, bo->base.base.size, placement, type);
232232
seq_printf(m, ", priority = %u, pin_count = %u, GEM refs = %d, TTM refs = %d",
233233
bo->base.priority,

drivers/gpu/drm/vmwgfx/vmwgfx_mob.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0 OR MIT
22
/**************************************************************************
33
*
4-
* Copyright 2012-2015 VMware, Inc., Palo Alto, CA., USA
4+
* Copyright 2012-2021 VMware, Inc., Palo Alto, CA., USA
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a
77
* copy of this software and associated documentation files (the
@@ -29,12 +29,6 @@
2929

3030
#include "vmwgfx_drv.h"
3131

32-
/*
33-
* If we set up the screen target otable, screen objects stop working.
34-
*/
35-
36-
#define VMW_OTABLE_SETUP_SUB ((VMWGFX_ENABLE_SCREEN_TARGET_OTABLE ? 0 : 1))
37-
3832
#ifdef CONFIG_64BIT
3933
#define VMW_PPN_SIZE 8
4034
#define VMW_MOBFMT_PTDEPTH_0 SVGA3D_MOBFMT_PT64_0
@@ -75,7 +69,7 @@ static const struct vmw_otable pre_dx_tables[] = {
7569
{VMWGFX_NUM_GB_CONTEXT * sizeof(SVGAOTableContextEntry), NULL, true},
7670
{VMWGFX_NUM_GB_SHADER * sizeof(SVGAOTableShaderEntry), NULL, true},
7771
{VMWGFX_NUM_GB_SCREEN_TARGET * sizeof(SVGAOTableScreenTargetEntry),
78-
NULL, VMWGFX_ENABLE_SCREEN_TARGET_OTABLE}
72+
NULL, true}
7973
};
8074

8175
static const struct vmw_otable dx_tables[] = {
@@ -84,7 +78,7 @@ static const struct vmw_otable dx_tables[] = {
8478
{VMWGFX_NUM_GB_CONTEXT * sizeof(SVGAOTableContextEntry), NULL, true},
8579
{VMWGFX_NUM_GB_SHADER * sizeof(SVGAOTableShaderEntry), NULL, true},
8680
{VMWGFX_NUM_GB_SCREEN_TARGET * sizeof(SVGAOTableScreenTargetEntry),
87-
NULL, VMWGFX_ENABLE_SCREEN_TARGET_OTABLE},
81+
NULL, true},
8882
{VMWGFX_NUM_DXCONTEXT * sizeof(SVGAOTableDXContextEntry), NULL, true},
8983
};
9084

drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,8 +1872,8 @@ int vmw_kms_stdu_init_display(struct vmw_private *dev_priv)
18721872
int i, ret;
18731873

18741874

1875-
/* Do nothing if Screen Target support is turned off */
1876-
if (!VMWGFX_ENABLE_SCREEN_TARGET_OTABLE || !dev_priv->has_mob)
1875+
/* Do nothing if there's no support for MOBs */
1876+
if (!dev_priv->has_mob)
18771877
return -ENOSYS;
18781878

18791879
if (!(dev_priv->capabilities & SVGA_CAP_GBOBJECTS))

drivers/gpu/drm/vmwgfx/vmwgfx_thp.c

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)