drm-misc-next for v5.12:
UAPI Changes: - Fix fourcc macro for amlogic video fbc. Cross-subsystem Changes: - Export pci_rebar_bytes_to_size. - Add a PCI quirk to increase bar0 for RX 5600 XT Pulse to max possible size. - Convert devicetree bindings to use the OF graph schema. - Update s6e63m0 bindings. - Make omapfb2 DSI_CM incompatible with drm/omap2 DSI-CM because of module conflicts. - Add Zack Rusin as vmwgfx maintainer. - Add CONFIG_DMABUF_DEBUG for validating dma-buf users don't loo kat struct page when importing or detaching. Core Changes: - Remove references to drm_device.pdev - Fix regression in ttm_bo_move_to_lru_tail(). - Assorted docbook updates. - Do not send dp-mst hotplug events on error when probing. - Move some agp macros to agpsupport.c, so it's not always compiled. - Move drm_need_swiotlb.h to drm_cache.c - Only build drm_memory.o for legacy drivers, and move CONFIG_DRM_VM to legacy. - Nuke drm_device.hose - Warn when the ttm resource manager is non-empty when disabling. - Assorted small fixes. Driver Changes: - Small assorted fixes in radeon, v3d, hisilicon, mipi-dbi, panfrost, hibmc, vc4, amdgpu, vkms, vmwgfx. - Move hisilicon to use simple encode. - Add writeback connector to vkms. - Add support for BT2020 to DE3. - Use gem prime mmap helpers in vc4, and move the mmap function upwards. - Use managed drm device, and cleanup error paths and display registers in vmwgfx. - Use correct bus_format and connector_type for innolux_n116bge. - Fix a lot of warnings with W=1 (Lee Jones) -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAmAGxDYACgkQ/lWMcqZw E8NLbw//XnkthxvMTK1y/eoBqJ0yFrO8YIcECZMW3Gxte7nPeXILoMfWTcDJIXh7 jBYi0+Ko12bhnvSka1L1U2VJ3rnu8JGt2K+kWK8Jz4hZxd9wmaARL20Mhli2o+81 cboIQsEo9a6uiQs1BfLSFIki9MYSK69o0b0K3nw1X+XMhLVWOE7zgy0pVxsCKpBG 8mnwMfX7G7hrwivrGAObKTiVWigteZgUlxACnSqP63zXg1OQtMMzk/PiCqZfH38T 8ODiH/Y2Aq+6TUInag2EAsWIMcIkHadyEv7C8GAeGfNBpTg6oknPpFyPV9RSG+aP Ofk18S6VAZO1uV/ynKwOcQqdU4J72k6nnkDM2mjfmc1sblauVYXEvm73RdBd/oGC bPDX2roSxqsS+pUvI5Tj8CqahAPy925hOxTcK7/yky/sXfdNtC8ZJ5cmawGocQhZ +8eDRgTsf7P7aYb7hdUGd5c2JkvMOt87REZeccRk1Ovrh/Z++D0936g/FAUpuDmL pUppBEyptT/13fPsCv7Xe3z5NbopMmDR0gmeZ6/0FzV8S5Pjkb5nYaryfJU4oJqD lE5AGazySuqOMb4wUqTURRuZsoRLswLaB+LS6zS55BEAYXHRt6OQvQXYrggRczi+ ie//r4L+qWaNkGO9ZyAQ4dyE46Lfp5KmJvQgqTC1r1ledh0xZt0= =JIou -----END PGP SIGNATURE----- Merge tag 'drm-misc-next-2021-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.12: UAPI Changes: - Fix fourcc macro for amlogic video fbc. Cross-subsystem Changes: - Export pci_rebar_bytes_to_size. - Add a PCI quirk to increase bar0 for RX 5600 XT Pulse to max possible size. - Convert devicetree bindings to use the OF graph schema. - Update s6e63m0 bindings. - Make omapfb2 DSI_CM incompatible with drm/omap2 DSI-CM because of module conflicts. - Add Zack Rusin as vmwgfx maintainer. - Add CONFIG_DMABUF_DEBUG for validating dma-buf users don't loo kat struct page when importing or detaching. Core Changes: - Remove references to drm_device.pdev - Fix regression in ttm_bo_move_to_lru_tail(). - Assorted docbook updates. - Do not send dp-mst hotplug events on error when probing. - Move some agp macros to agpsupport.c, so it's not always compiled. - Move drm_need_swiotlb.h to drm_cache.c - Only build drm_memory.o for legacy drivers, and move CONFIG_DRM_VM to legacy. - Nuke drm_device.hose - Warn when the ttm resource manager is non-empty when disabling. - Assorted small fixes. Driver Changes: - Small assorted fixes in radeon, v3d, hisilicon, mipi-dbi, panfrost, hibmc, vc4, amdgpu, vkms, vmwgfx. - Move hisilicon to use simple encode. - Add writeback connector to vkms. - Add support for BT2020 to DE3. - Use gem prime mmap helpers in vc4, and move the mmap function upwards. - Use managed drm device, and cleanup error paths and display registers in vmwgfx. - Use correct bus_format and connector_type for innolux_n116bge. - Fix a lot of warnings with W=1 (Lee Jones) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/5c3ad775-48ce-33ee-e4c6-a5e1e540f845@linux.intel.com
This commit is contained in:
Коммит
71c46fc33a
|
@ -84,36 +84,23 @@ properties:
|
|||
const: dma-mem
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Output endpoints of the controller.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -57,35 +57,22 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -76,37 +76,24 @@ properties:
|
|||
- const: audio-tx
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller. Usually an HDMI
|
||||
connector.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -115,31 +115,24 @@ properties:
|
|||
- const: lvds
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
|
||||
patternProperties:
|
||||
"^endpoint(@[0-9])$":
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
allwinner,tcon-channel:
|
||||
|
@ -156,16 +149,10 @@ properties:
|
|||
property is not present, the endpoint number will be
|
||||
used as the channel number.
|
||||
|
||||
unevaluatedProperties: true
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -24,11 +24,9 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt. The
|
||||
first port should be the input endpoint, usually coming from the
|
||||
The first port should be the input endpoint, usually coming from the
|
||||
associated TCON.
|
||||
|
||||
required:
|
||||
|
|
|
@ -46,36 +46,23 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -47,11 +47,9 @@ properties:
|
|||
const: dphy
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt. That
|
||||
port should be the input endpoint, usually coming from the
|
||||
The port should be the input endpoint, usually coming from the
|
||||
associated TCON.
|
||||
|
||||
required:
|
||||
|
|
|
@ -43,35 +43,22 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -93,38 +93,25 @@ properties:
|
|||
The VCC power supply of the controller
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller. Usually the associated
|
||||
TCON.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller. Usually an HDMI
|
||||
connector.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -80,141 +80,45 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
All ports should have only one endpoint connected to
|
||||
remote endpoint.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoint for Mixer 0 mux.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoint for Mixer 0 mux
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
reg: true
|
||||
|
||||
patternProperties:
|
||||
"^endpoint@[0-9]$":
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: |
|
||||
ID of the target TCON
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoint for Mixer 1 mux.
|
||||
|
||||
port@3:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoint for Mixer 1 mux
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
reg: true
|
||||
|
||||
patternProperties:
|
||||
"^endpoint@[0-9]$":
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: |
|
||||
ID of the target TCON
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
port@4:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoint for HDMI mux.
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
reg: true
|
||||
|
||||
patternProperties:
|
||||
"^endpoint@[0-9]$":
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
description: |
|
||||
ID of the target TCON
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
port@5:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoint for HDMI mux
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
- port@4
|
||||
- port@5
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- "#clock-cells"
|
||||
- compatible
|
||||
|
|
|
@ -40,36 +40,23 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
A ports node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -81,12 +81,12 @@ properties:
|
|||
description: phandle to an external 5V regulator to power the HDMI logic
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node pointing to the VENC Input port node.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node pointing to the TMDS Output port node.
|
||||
|
||||
|
|
|
@ -83,12 +83,12 @@ properties:
|
|||
description: phandle to the associated power domain
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node pointing to the CVBS VDAC port node.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node pointing to the HDMI-TX port node.
|
||||
|
||||
|
|
|
@ -27,10 +27,9 @@ properties:
|
|||
- const: pixel
|
||||
|
||||
port:
|
||||
type: object
|
||||
description: >
|
||||
Port node with a single endpoint connecting to the panel, as
|
||||
defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Port node with a single endpoint connecting to the panel.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
|
|
@ -35,16 +35,16 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for MIPI DSI input.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for panel or connector.
|
||||
|
||||
|
|
|
@ -42,31 +42,18 @@ properties:
|
|||
description: Regulator for 1.0V digital core power.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
A node containing input and output port nodes with endpoint
|
||||
definitions as documented in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Video port for HDMI input.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for SlimPort, DisplayPort, eDP or MyDP output.
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
|
|
@ -32,31 +32,23 @@ properties:
|
|||
description: Regulator for 2.5V digital core power.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for LVTTL input
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for eDP output (panel or connector).
|
||||
May be omitted if EDID works reliably.
|
||||
|
||||
required:
|
||||
- port@0
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -57,47 +57,37 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
Ports as described in Documentation/devicetree/bindings/graph.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
First input port representing the DP bridge input.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Second input port representing the DP bridge input.
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Third input port representing the DP bridge input.
|
||||
|
||||
port@3:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Fourth input port representing the DP bridge input.
|
||||
|
||||
port@4:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Output port representing the DP bridge output.
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@4
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
|
|
|
@ -19,16 +19,16 @@ properties:
|
|||
description: I2C address of the device
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Video port for RGB input.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
DVI port, should be connected to a node compatible with the
|
||||
dvi-connector binding.
|
||||
|
|
|
@ -35,29 +35,21 @@ properties:
|
|||
- const: clk_mipi_cfg
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: MIPI DSI input port.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DSI output port.
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -53,7 +53,7 @@ properties:
|
|||
description: extcon specifier for the Power Delivery
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: A port node pointing to DPI host port node
|
||||
|
||||
required:
|
||||
|
|
|
@ -38,82 +38,26 @@ properties:
|
|||
description: Regulator for 3.3V IO power.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Primary MIPI port-1 for MIPI input
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
"^endpoint(@[0-9])$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Additional MIPI port-2 for MIPI input, used in combination
|
||||
with primary MIPI port-1 to drive higher resolution displays
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
patternProperties:
|
||||
"^endpoint(@[0-9])$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
HDMI port for HDMI output
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 2
|
||||
|
||||
patternProperties:
|
||||
"^endpoint(@[0-9])$":
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@2
|
||||
|
||||
|
|
|
@ -45,25 +45,17 @@ properties:
|
|||
- thine,thc63lvdm83d # For the THC63LVDM83D LVDS serializer
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
This device has two video ports. Their connections are modeled using the
|
||||
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
For LVDS encoders, port 0 is the parallel input
|
||||
For LVDS decoders, port 0 is the LVDS input
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
For LVDS encoders, port 1 is the LVDS output
|
||||
For LVDS decoders, port 1 is the parallel output
|
||||
|
@ -72,8 +64,6 @@ properties:
|
|||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
powerdown-gpios:
|
||||
description:
|
||||
The GPIO used to control the power down line of this device.
|
||||
|
|
|
@ -84,40 +84,23 @@ properties:
|
|||
- const: pclk
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
A node containing DSI input & output port nodes with endpoint
|
||||
definitions as documented in
|
||||
Documentation/devicetree/bindings/graph.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
description:
|
||||
Input port node to receive pixel data from the
|
||||
display controller. Exactly one endpoint must be
|
||||
specified.
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
endpoint@0:
|
||||
$ref: /schemas/graph.yaml#/properties/endpoint
|
||||
description: sub-node describing the input from LCDIF
|
||||
type: object
|
||||
|
||||
endpoint@1:
|
||||
$ref: /schemas/graph.yaml#/properties/endpoint
|
||||
description: sub-node describing the input from DCSS
|
||||
type: object
|
||||
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
- reg
|
||||
|
||||
oneOf:
|
||||
- required:
|
||||
|
@ -125,28 +108,18 @@ properties:
|
|||
- required:
|
||||
- endpoint@1
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
DSI output port node to the panel or the next bridge
|
||||
in the chain
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
required:
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
|
|
|
@ -41,34 +41,22 @@ properties:
|
|||
description: Regulator for 3.3V digital core power.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
A node containing DSI input & output port nodes with endpoint
|
||||
definitions as documented in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for DSI input
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for eDP output (panel or connector).
|
||||
|
||||
required:
|
||||
- port@0
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -49,33 +49,21 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
This device has two video ports. Their connections are modelled using the
|
||||
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
|
||||
Each port shall have a single endpoint.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Parallel RGB input port
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: LVDS output port
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
|
|
|
@ -30,31 +30,21 @@ properties:
|
|||
- ti,ths8135
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description: |
|
||||
This device has two video ports. Their connections are modeled using the
|
||||
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: The bridge input
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: The bridge output
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
enable-gpios:
|
||||
maxItems: 1
|
||||
description: GPIO controlling bridge enable
|
||||
|
|
|
@ -47,14 +47,15 @@ properties:
|
|||
const: apb
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Input node to receive pixel data.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DSI output node to panel.
|
||||
|
||||
required:
|
||||
|
|
|
@ -25,11 +25,8 @@ properties:
|
|||
const: thine,thc63lvd1024
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
description: |
|
||||
This device has four video ports. Their connections are modeled using the
|
||||
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
|
||||
|
||||
The device can operate in single or dual input and output modes.
|
||||
|
||||
When operating in single input mode, all pixels are received on port@0,
|
||||
|
@ -43,34 +40,26 @@ properties:
|
|||
port@3 shall contain endpoints.
|
||||
|
||||
properties:
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: First LVDS input port
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Second LVDS input port
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: First digital CMOS/TTL parallel output
|
||||
|
||||
port@3:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Second digital CMOS/TTL parallel output
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@2
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
oe-gpios:
|
||||
maxItems: 1
|
||||
description: Output enable GPIO signal, pin name "OE", active high.
|
||||
|
|
|
@ -71,54 +71,26 @@ properties:
|
|||
description: See ../../pwm/pwm.yaml for description of the cell formats.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for MIPI DSI input
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
remote-endpoint: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
Video port for eDP output (panel or connector).
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint: true
|
||||
|
||||
data-lanes:
|
||||
oneOf:
|
||||
- minItems: 1
|
||||
|
@ -171,12 +143,7 @@ properties:
|
|||
dependencies:
|
||||
lane-polarities: [data-lanes]
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
|
|
|
@ -31,23 +31,18 @@ properties:
|
|||
maximum: 7
|
||||
|
||||
ports:
|
||||
description:
|
||||
A node containing input and output port nodes with endpoint
|
||||
definitions as documented in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: DPI input port.
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
endpoint:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
pclk-sample:
|
||||
|
@ -67,15 +62,8 @@ properties:
|
|||
default: 24
|
||||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DVI output port.
|
||||
type: object
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
endpoint:
|
||||
type: object
|
||||
|
||||
required:
|
||||
- port@0
|
||||
|
|
|
@ -25,62 +25,20 @@ properties:
|
|||
description: Regulator for 1.2V internal core power.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for MIPI DSI input
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
description: |
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Video port for MIPI DPI output (panel or connector).
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
patternProperties:
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
|
|
|
@ -42,65 +42,30 @@ properties:
|
|||
const: refclk
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: |
|
||||
Video port for RGB input
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
data-lines:
|
||||
enum: [ 16, 18, 24 ]
|
||||
|
||||
remote-endpoint: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Video port for DSI output (panel or connector).
|
||||
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
patternProperties:
|
||||
endpoint:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
remote-endpoint: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
|
@ -156,4 +121,3 @@ examples:
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -42,31 +42,22 @@ properties:
|
|||
description: Hardware reset, Low active
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
A node containing input and output port nodes with endpoint definitions
|
||||
as documented in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
DSI Input. The remote endpoint phandle should be a
|
||||
reference to a valid mipi_dsi_host device node.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Video port for LVDS output (panel or connector).
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Video port for Dual link LVDS output (panel or connector).
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ properties:
|
|||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Connection to controller providing analog TV signals
|
||||
|
||||
required:
|
||||
|
|
|
@ -36,6 +36,7 @@ properties:
|
|||
description: the connector has pins for DVI dual-link
|
||||
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Connection to controller providing DVI signals
|
||||
|
||||
required:
|
||||
|
|
|
@ -37,6 +37,7 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Connection to controller providing HDMI signals
|
||||
|
||||
required:
|
||||
|
|
|
@ -20,6 +20,7 @@ properties:
|
|||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Connection to controller providing VGA signals
|
||||
|
||||
required:
|
||||
|
|
|
@ -74,7 +74,7 @@ properties:
|
|||
- description: Must be 400 MHz
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A port node pointing to the input port of a HDMI/DP or MIPI display bridge.
|
||||
|
||||
|
|
|
@ -31,9 +31,8 @@ properties:
|
|||
clock-names:
|
||||
const: ipu
|
||||
|
||||
patternProperties:
|
||||
"^ports?$":
|
||||
description: OF graph bindings (specified in bindings/graph.txt).
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
|
|
@ -39,18 +39,18 @@ properties:
|
|||
minItems: 1
|
||||
|
||||
port:
|
||||
description: OF graph bindings (specified in bindings/graph.txt).
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
|
||||
ports:
|
||||
description: OF graph bindings (specified in bindings/graph.txt).
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DPI output, to interface with TFT panels.
|
||||
|
||||
port@8:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Link to the Image Processing Unit (IPU).
|
||||
(See ingenic,ipu.yaml).
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Display output node to DSI.
|
||||
|
||||
required:
|
||||
|
|
|
@ -37,34 +37,33 @@ properties:
|
|||
panel-timing: true
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: The sink for odd pixels.
|
||||
properties:
|
||||
reg:
|
||||
const: 0
|
||||
|
||||
dual-lvds-odd-pixels: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
- dual-lvds-odd-pixels
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/$defs/port-base
|
||||
unevaluatedProperties: false
|
||||
description: The sink for even pixels.
|
||||
properties:
|
||||
reg:
|
||||
const: 1
|
||||
|
||||
dual-lvds-even-pixels: true
|
||||
|
||||
required:
|
||||
- reg
|
||||
- dual-lvds-even-pixels
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
|
|
|
@ -68,16 +68,7 @@ properties:
|
|||
|
||||
# Connectivity
|
||||
port:
|
||||
type: object
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
Panels receive video data through one or multiple connections. While
|
||||
the nature of those connections is specific to the panel type, the
|
||||
connectivity is expressed in a standard fashion using ports as specified
|
||||
in the device graph bindings defined in
|
||||
Documentation/devicetree/bindings/graph.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
|
||||
ddc-i2c-bus:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
|
|
|
@ -11,6 +11,7 @@ maintainers:
|
|||
|
||||
allOf:
|
||||
- $ref: panel-common.yaml#
|
||||
- $ref: /schemas/leds/backlight/common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
|
@ -19,6 +20,8 @@ properties:
|
|||
reg: true
|
||||
reset-gpios: true
|
||||
port: true
|
||||
default-brightness: true
|
||||
max-brightness: true
|
||||
|
||||
vdd3-supply:
|
||||
description: VDD regulator
|
||||
|
@ -31,7 +34,6 @@ required:
|
|||
- reset-gpios
|
||||
- vdd3-supply
|
||||
- vci-supply
|
||||
- port
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
|
|
|
@ -43,34 +43,24 @@ properties:
|
|||
This soc uses GRF regs to switch the HDMI TX input between vop0 and vop1.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Port node with two endpoints, numbered 0 and 1,
|
||||
connected respectively to vop0 and vop1.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Port node with one endpoint connected to a hdmi-connector node.
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
|
|
@ -70,10 +70,7 @@ properties:
|
|||
- const: dclk
|
||||
|
||||
port:
|
||||
type: object
|
||||
description:
|
||||
A port node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt.
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
|
||||
assigned-clocks:
|
||||
maxItems: 2
|
||||
|
|
|
@ -51,20 +51,16 @@ properties:
|
|||
Phandle of the regulator that provides the supply voltage.
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
A node containing DSI input & output port nodes with endpoint
|
||||
definitions as documented in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
DSI input port node, connected to the ltdc rgb output port.
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
DSI output port node, connected to a panel or a bridge input port"
|
||||
|
||||
|
|
|
@ -35,15 +35,13 @@ properties:
|
|||
maxItems: 1
|
||||
|
||||
port:
|
||||
type: object
|
||||
description:
|
||||
"Video port for DPI RGB output.
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: |
|
||||
Video port for DPI RGB output.
|
||||
ltdc has one video port with up to 2 endpoints:
|
||||
- for external dpi rgb panel or bridge, using gpios.
|
||||
- for internal dpi input of the MIPI DSI host controller.
|
||||
Note: These 2 endpoints cannot be activated simultaneously.
|
||||
Please refer to the bindings defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt."
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
|
|
@ -42,10 +42,9 @@ properties:
|
|||
description: a phandle to the analog voltage regulator
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
A DPI port node with endpoint definitions as defined in
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
A DPI port node
|
||||
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
|
|
@ -74,30 +74,19 @@ properties:
|
|||
type: boolean
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
Ports as described in Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The DSS OLDI output port node form video port 1
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The DSS DPI output port node from video port 2
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
ti,am65x-oldi-io-ctrl:
|
||||
$ref: "/schemas/types.yaml#/definitions/phandle-array"
|
||||
maxItems: 1
|
||||
|
|
|
@ -107,40 +107,29 @@ properties:
|
|||
type: boolean
|
||||
|
||||
ports:
|
||||
type: object
|
||||
description:
|
||||
Ports as described in Documentation/devicetree/bindings/graph.txt
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
|
||||
properties:
|
||||
"#address-cells":
|
||||
const: 1
|
||||
|
||||
"#size-cells":
|
||||
const: 0
|
||||
|
||||
port@0:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The output port node form video port 1
|
||||
|
||||
port@1:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The output port node from video port 2
|
||||
|
||||
port@2:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The output port node from video port 3
|
||||
|
||||
port@3:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
The output port node from video port 4
|
||||
|
||||
required:
|
||||
- "#address-cells"
|
||||
- "#size-cells"
|
||||
|
||||
max-memory-bandwidth:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
|
|
|
@ -54,9 +54,8 @@ properties:
|
|||
description: phandle to the associated power domain
|
||||
|
||||
port:
|
||||
type: object
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Port as described in Documentation/devicetree/bindings/graph.txt.
|
||||
The DSS DPI output port node
|
||||
|
||||
max-memory-bandwidth:
|
||||
|
|
|
@ -35,6 +35,18 @@ Now, to load the driver, use::
|
|||
On running the lsmod command now, the VKMS driver will appear listed.
|
||||
You can also observe the driver being loaded in the dmesg logs.
|
||||
|
||||
The VKMS driver has optional features to simulate different kinds of hardware,
|
||||
which are exposed as module options. You can use the `modinfo` command
|
||||
to see the module options for vkms::
|
||||
|
||||
modinfo vkms
|
||||
|
||||
Module options are helpful when testing, and enabling modules
|
||||
can be done while loading vkms. For example, to load vkms with cursor enabled,
|
||||
use::
|
||||
|
||||
sudo modprobe vkms enable_cursor=1
|
||||
|
||||
To disable the driver, use ::
|
||||
|
||||
sudo modprobe -r vkms
|
||||
|
|
|
@ -5784,6 +5784,7 @@ F: drivers/gpu/drm/vboxvideo/
|
|||
DRM DRIVER FOR VMWARE VIRTUAL GPU
|
||||
M: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
|
||||
M: Roland Scheidegger <sroland@vmware.com>
|
||||
M: Zack Rusin <zackr@vmware.com>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
S: Supported
|
||||
T: git git://people.freedesktop.org/~sroland/linux
|
||||
|
|
|
@ -50,6 +50,14 @@ config DMABUF_MOVE_NOTIFY
|
|||
This is marked experimental because we don't yet have a consistent
|
||||
execution context and memory management between drivers.
|
||||
|
||||
config DMABUF_DEBUG
|
||||
bool "DMA-BUF debug checks"
|
||||
default y if DMA_API_DEBUG
|
||||
help
|
||||
This option enables additional checks for DMA-BUF importers and
|
||||
exporters. Specifically it validates that importers do not peek at the
|
||||
underlying struct page when they import a buffer.
|
||||
|
||||
config DMABUF_SELFTESTS
|
||||
tristate "Selftests for the dma-buf interfaces"
|
||||
default n
|
||||
|
|
|
@ -653,6 +653,34 @@ void dma_buf_put(struct dma_buf *dmabuf)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(dma_buf_put);
|
||||
|
||||
static void mangle_sg_table(struct sg_table *sg_table)
|
||||
{
|
||||
#ifdef CONFIG_DMABUF_DEBUG
|
||||
int i;
|
||||
struct scatterlist *sg;
|
||||
|
||||
/* To catch abuse of the underlying struct page by importers mix
|
||||
* up the bits, but take care to preserve the low SG_ bits to
|
||||
* not corrupt the sgt. The mixing is undone in __unmap_dma_buf
|
||||
* before passing the sgt back to the exporter. */
|
||||
for_each_sgtable_sg(sg_table, sg, i)
|
||||
sg->page_link ^= ~0xffUL;
|
||||
#endif
|
||||
|
||||
}
|
||||
static struct sg_table * __map_dma_buf(struct dma_buf_attachment *attach,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
struct sg_table *sg_table;
|
||||
|
||||
sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
|
||||
|
||||
if (!IS_ERR_OR_NULL(sg_table))
|
||||
mangle_sg_table(sg_table);
|
||||
|
||||
return sg_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* dma_buf_dynamic_attach - Add the device to dma_buf's attachments list
|
||||
* @dmabuf: [in] buffer to attach device to.
|
||||
|
@ -724,7 +752,7 @@ dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
|
|||
goto err_unlock;
|
||||
}
|
||||
|
||||
sgt = dmabuf->ops->map_dma_buf(attach, DMA_BIDIRECTIONAL);
|
||||
sgt = __map_dma_buf(attach, DMA_BIDIRECTIONAL);
|
||||
if (!sgt)
|
||||
sgt = ERR_PTR(-ENOMEM);
|
||||
if (IS_ERR(sgt)) {
|
||||
|
@ -771,6 +799,16 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(dma_buf_attach);
|
||||
|
||||
static void __unmap_dma_buf(struct dma_buf_attachment *attach,
|
||||
struct sg_table *sg_table,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
/* uses XOR, hence this unmangles */
|
||||
mangle_sg_table(sg_table);
|
||||
|
||||
attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, direction);
|
||||
}
|
||||
|
||||
/**
|
||||
* dma_buf_detach - Remove the given attachment from dmabuf's attachments list
|
||||
* @dmabuf: [in] buffer to detach from.
|
||||
|
@ -789,7 +827,7 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)
|
|||
if (dma_buf_is_dynamic(attach->dmabuf))
|
||||
dma_resv_lock(attach->dmabuf->resv, NULL);
|
||||
|
||||
dmabuf->ops->unmap_dma_buf(attach, attach->sgt, attach->dir);
|
||||
__unmap_dma_buf(attach, attach->sgt, attach->dir);
|
||||
|
||||
if (dma_buf_is_dynamic(attach->dmabuf)) {
|
||||
dma_buf_unpin(attach);
|
||||
|
@ -911,7 +949,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
|
|||
}
|
||||
}
|
||||
|
||||
sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
|
||||
sg_table = __map_dma_buf(attach, direction);
|
||||
if (!sg_table)
|
||||
sg_table = ERR_PTR(-ENOMEM);
|
||||
|
||||
|
@ -974,7 +1012,7 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
|
|||
if (dma_buf_is_dynamic(attach->dmabuf))
|
||||
dma_resv_assert_held(attach->dmabuf->resv);
|
||||
|
||||
attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, direction);
|
||||
__unmap_dma_buf(attach, sg_table, direction);
|
||||
|
||||
if (dma_buf_is_dynamic(attach->dmabuf) &&
|
||||
!IS_ENABLED(CONFIG_DMABUF_MOVE_NOTIFY))
|
||||
|
|
|
@ -214,10 +214,6 @@ config DRM_GEM_SHMEM_HELPER
|
|||
help
|
||||
Choose this if you need the GEM shmem helper functions
|
||||
|
||||
config DRM_VM
|
||||
bool
|
||||
depends on DRM && MMU
|
||||
|
||||
config DRM_SCHED
|
||||
tristate
|
||||
depends on DRM
|
||||
|
@ -391,7 +387,6 @@ source "drivers/gpu/drm/xlnx/Kconfig"
|
|||
menuconfig DRM_LEGACY
|
||||
bool "Enable legacy drivers (DANGEROUS)"
|
||||
depends on DRM && MMU
|
||||
select DRM_VM
|
||||
help
|
||||
Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
|
||||
APIs to user-space, which can be used to circumvent access
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
drm-y := drm_auth.o drm_cache.o \
|
||||
drm_file.o drm_gem.o drm_ioctl.o drm_irq.o \
|
||||
drm_memory.o drm_drv.o \
|
||||
drm_drv.o \
|
||||
drm_sysfs.o drm_hashtab.o drm_mm.o \
|
||||
drm_crtc.o drm_fourcc.o drm_modes.o drm_edid.o \
|
||||
drm_encoder_slave.o \
|
||||
|
@ -20,9 +20,9 @@ drm-y := drm_auth.o drm_cache.o \
|
|||
drm_client_modeset.o drm_atomic_uapi.o drm_hdcp.o \
|
||||
drm_managed.o drm_vblank_work.o
|
||||
|
||||
drm-$(CONFIG_DRM_LEGACY) += drm_legacy_misc.o drm_bufs.o drm_context.o drm_dma.o drm_scatter.o drm_lock.o
|
||||
drm-$(CONFIG_DRM_LEGACY) += drm_bufs.o drm_context.o drm_dma.o drm_legacy_misc.o drm_lock.o \
|
||||
drm_memory.o drm_scatter.o drm_vm.o
|
||||
drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
|
||||
drm-$(CONFIG_DRM_VM) += drm_vm.o
|
||||
drm-$(CONFIG_COMPAT) += drm_ioc32.o
|
||||
drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
|
||||
drm-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_gem_shmem_helper.o
|
||||
|
|
|
@ -1106,8 +1106,7 @@ void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb)
|
|||
*/
|
||||
int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
|
||||
{
|
||||
u64 space_needed = roundup_pow_of_two(adev->gmc.real_vram_size);
|
||||
u32 rbar_size = order_base_2(((space_needed >> 20) | 1)) - 1;
|
||||
int rbar_size = pci_rebar_bytes_to_size(adev->gmc.real_vram_size);
|
||||
struct pci_bus *root;
|
||||
struct resource *res;
|
||||
unsigned i;
|
||||
|
@ -1138,6 +1137,10 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
|
|||
if (!res)
|
||||
return 0;
|
||||
|
||||
/* Limit the BAR size to what is available */
|
||||
rbar_size = min(fls(pci_rebar_get_possible_sizes(adev->pdev, 0)) - 1,
|
||||
rbar_size);
|
||||
|
||||
/* Disable memory decoding while we change the BAR addresses and size */
|
||||
pci_read_config_word(adev->pdev, PCI_COMMAND, &cmd);
|
||||
pci_write_config_word(adev->pdev, PCI_COMMAND,
|
||||
|
@ -1423,9 +1426,9 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,
|
|||
/* don't suspend or resume card normally */
|
||||
dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
||||
|
||||
pci_set_power_state(dev->pdev, PCI_D0);
|
||||
amdgpu_device_load_pci_state(dev->pdev);
|
||||
r = pci_enable_device(dev->pdev);
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
amdgpu_device_load_pci_state(pdev);
|
||||
r = pci_enable_device(pdev);
|
||||
if (r)
|
||||
DRM_WARN("pci_enable_device failed (%d)\n", r);
|
||||
amdgpu_device_resume(dev, true);
|
||||
|
@ -1437,10 +1440,10 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,
|
|||
drm_kms_helper_poll_disable(dev);
|
||||
dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
||||
amdgpu_device_suspend(dev, true);
|
||||
amdgpu_device_cache_pci_state(dev->pdev);
|
||||
amdgpu_device_cache_pci_state(pdev);
|
||||
/* Shut down the device */
|
||||
pci_disable_device(dev->pdev);
|
||||
pci_set_power_state(dev->pdev, PCI_D3cold);
|
||||
pci_disable_device(pdev);
|
||||
pci_set_power_state(pdev, PCI_D3cold);
|
||||
dev->switch_power_state = DRM_SWITCH_POWER_OFF;
|
||||
}
|
||||
}
|
||||
|
@ -1703,8 +1706,7 @@ static void amdgpu_device_enable_virtual_display(struct amdgpu_device *adev)
|
|||
adev->enable_virtual_display = false;
|
||||
|
||||
if (amdgpu_virtual_display) {
|
||||
struct drm_device *ddev = adev_to_drm(adev);
|
||||
const char *pci_address_name = pci_name(ddev->pdev);
|
||||
const char *pci_address_name = pci_name(adev->pdev);
|
||||
char *pciaddstr, *pciaddstr_tmp, *pciaddname_tmp, *pciaddname;
|
||||
|
||||
pciaddstr = kstrdup(amdgpu_virtual_display, GFP_KERNEL);
|
||||
|
@ -3397,7 +3399,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
|||
}
|
||||
}
|
||||
|
||||
pci_enable_pcie_error_reporting(adev->ddev.pdev);
|
||||
pci_enable_pcie_error_reporting(adev->pdev);
|
||||
|
||||
/* Post card if necessary */
|
||||
if (amdgpu_device_need_post(adev)) {
|
||||
|
@ -4950,8 +4952,8 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
|
|||
case pci_channel_io_normal:
|
||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
||||
/* Fatal error, prepare for slot reset */
|
||||
case pci_channel_io_frozen:
|
||||
/*
|
||||
case pci_channel_io_frozen:
|
||||
/*
|
||||
* Cancel and wait for all TDRs in progress if failing to
|
||||
* set adev->in_gpu_reset in amdgpu_device_lock_adev
|
||||
*
|
||||
|
@ -5042,7 +5044,7 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
adev->in_pci_err_recovery = true;
|
||||
adev->in_pci_err_recovery = true;
|
||||
r = amdgpu_device_pre_asic_reset(adev, NULL, &need_full_reset);
|
||||
adev->in_pci_err_recovery = false;
|
||||
if (r)
|
||||
|
|
|
@ -1204,7 +1204,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ddev->pdev = pdev;
|
||||
pci_set_drvdata(pdev, ddev);
|
||||
|
||||
ret = amdgpu_driver_load_kms(adev, ent->driver_data);
|
||||
|
|
|
@ -271,7 +271,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
|
|||
DRM_INFO("fb depth is %d\n", fb->format->depth);
|
||||
DRM_INFO(" pitch is %d\n", fb->pitches[0]);
|
||||
|
||||
vga_switcheroo_client_fb_set(adev_to_drm(adev)->pdev, info);
|
||||
vga_switcheroo_client_fb_set(adev->pdev, info);
|
||||
return 0;
|
||||
|
||||
out:
|
||||
|
|
|
@ -619,7 +619,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
int r = 0;
|
||||
|
||||
if (args->va_address < AMDGPU_VA_RESERVED_SIZE) {
|
||||
dev_dbg(&dev->pdev->dev,
|
||||
dev_dbg(dev->dev,
|
||||
"va_address 0x%LX is in reserved area 0x%LX\n",
|
||||
args->va_address, AMDGPU_VA_RESERVED_SIZE);
|
||||
return -EINVAL;
|
||||
|
@ -627,7 +627,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
if (args->va_address >= AMDGPU_GMC_HOLE_START &&
|
||||
args->va_address < AMDGPU_GMC_HOLE_END) {
|
||||
dev_dbg(&dev->pdev->dev,
|
||||
dev_dbg(dev->dev,
|
||||
"va_address 0x%LX is in VA hole 0x%LX-0x%LX\n",
|
||||
args->va_address, AMDGPU_GMC_HOLE_START,
|
||||
AMDGPU_GMC_HOLE_END);
|
||||
|
@ -639,14 +639,14 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
|
||||
vm_size -= AMDGPU_VA_RESERVED_SIZE;
|
||||
if (args->va_address + args->map_size > vm_size) {
|
||||
dev_dbg(&dev->pdev->dev,
|
||||
dev_dbg(dev->dev,
|
||||
"va_address 0x%llx is in top reserved area 0x%llx\n",
|
||||
args->va_address + args->map_size, vm_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) {
|
||||
dev_dbg(&dev->pdev->dev, "invalid flags combination 0x%08X\n",
|
||||
dev_dbg(dev->dev, "invalid flags combination 0x%08X\n",
|
||||
args->flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
case AMDGPU_VA_OP_REPLACE:
|
||||
break;
|
||||
default:
|
||||
dev_dbg(&dev->pdev->dev, "unsupported operation %d\n",
|
||||
dev_dbg(dev->dev, "unsupported operation %d\n",
|
||||
args->operation);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
|
|||
i2c->rec = *rec;
|
||||
i2c->adapter.owner = THIS_MODULE;
|
||||
i2c->adapter.class = I2C_CLASS_DDC;
|
||||
i2c->adapter.dev.parent = &dev->pdev->dev;
|
||||
i2c->adapter.dev.parent = dev->dev;
|
||||
i2c->dev = dev;
|
||||
i2c_set_adapdata(&i2c->adapter, i2c);
|
||||
mutex_init(&i2c->mutex);
|
||||
|
|
|
@ -142,7 +142,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
|
|||
(amdgpu_is_atpx_hybrid() ||
|
||||
amdgpu_has_atpx_dgpu_power_cntl()) &&
|
||||
((flags & AMD_IS_APU) == 0) &&
|
||||
!pci_is_thunderbolt_attached(dev->pdev))
|
||||
!pci_is_thunderbolt_attached(to_pci_dev(dev->dev)))
|
||||
flags |= AMD_IS_PX;
|
||||
|
||||
parent = pci_upstream_bridge(adev->pdev);
|
||||
|
@ -156,7 +156,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
|
|||
*/
|
||||
r = amdgpu_device_init(adev, flags);
|
||||
if (r) {
|
||||
dev_err(&dev->pdev->dev, "Fatal error during GPU init\n");
|
||||
dev_err(dev->dev, "Fatal error during GPU init\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
|
|||
|
||||
acpi_status = amdgpu_acpi_init(adev);
|
||||
if (acpi_status)
|
||||
dev_dbg(&dev->pdev->dev, "Error during ACPI methods call\n");
|
||||
dev_dbg(dev->dev, "Error during ACPI methods call\n");
|
||||
|
||||
if (adev->runpm) {
|
||||
/* only need to skip on ATPX */
|
||||
|
@ -735,10 +735,10 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
|||
if (!dev_info)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_info->device_id = dev->pdev->device;
|
||||
dev_info->device_id = adev->pdev->device;
|
||||
dev_info->chip_rev = adev->rev_id;
|
||||
dev_info->external_rev = adev->external_rev_id;
|
||||
dev_info->pci_rev = dev->pdev->revision;
|
||||
dev_info->pci_rev = adev->pdev->revision;
|
||||
dev_info->family = adev->family;
|
||||
dev_info->num_shader_engines = adev->gfx.config.max_shader_engines;
|
||||
dev_info->num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
|
||||
|
|
|
@ -147,7 +147,7 @@ static int ast_drm_freeze(struct drm_device *dev)
|
|||
error = drm_mode_config_helper_suspend(dev);
|
||||
if (error)
|
||||
return error;
|
||||
pci_save_state(dev->pdev);
|
||||
pci_save_state(to_pci_dev(dev->dev));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ static int ast_drm_resume(struct drm_device *dev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (pci_enable_device(dev->pdev))
|
||||
if (pci_enable_device(to_pci_dev(dev->dev)))
|
||||
return -EIO;
|
||||
|
||||
ret = ast_drm_thaw(dev);
|
||||
|
|
|
@ -67,8 +67,9 @@ uint8_t ast_get_index_reg_mask(struct ast_private *ast,
|
|||
|
||||
static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
|
||||
{
|
||||
struct device_node *np = dev->pdev->dev.of_node;
|
||||
struct device_node *np = dev->dev->of_node;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
uint32_t data, jregd0, jregd1;
|
||||
|
||||
/* Defaults */
|
||||
|
@ -85,7 +86,7 @@ static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
|
|||
}
|
||||
|
||||
/* Not all families have a P2A bridge */
|
||||
if (dev->pdev->device != PCI_CHIP_AST2000)
|
||||
if (pdev->device != PCI_CHIP_AST2000)
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@ -119,6 +120,7 @@ static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
|
|||
static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
uint32_t jreg, scu_rev;
|
||||
|
||||
/*
|
||||
|
@ -143,19 +145,19 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
|||
ast_detect_config_mode(dev, &scu_rev);
|
||||
|
||||
/* Identify chipset */
|
||||
if (dev->pdev->revision >= 0x50) {
|
||||
if (pdev->revision >= 0x50) {
|
||||
ast->chip = AST2600;
|
||||
drm_info(dev, "AST 2600 detected\n");
|
||||
} else if (dev->pdev->revision >= 0x40) {
|
||||
} else if (pdev->revision >= 0x40) {
|
||||
ast->chip = AST2500;
|
||||
drm_info(dev, "AST 2500 detected\n");
|
||||
} else if (dev->pdev->revision >= 0x30) {
|
||||
} else if (pdev->revision >= 0x30) {
|
||||
ast->chip = AST2400;
|
||||
drm_info(dev, "AST 2400 detected\n");
|
||||
} else if (dev->pdev->revision >= 0x20) {
|
||||
} else if (pdev->revision >= 0x20) {
|
||||
ast->chip = AST2300;
|
||||
drm_info(dev, "AST 2300 detected\n");
|
||||
} else if (dev->pdev->revision >= 0x10) {
|
||||
} else if (pdev->revision >= 0x10) {
|
||||
switch (scu_rev & 0x0300) {
|
||||
case 0x0200:
|
||||
ast->chip = AST1100;
|
||||
|
@ -265,7 +267,7 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
|||
|
||||
static int ast_get_dram_info(struct drm_device *dev)
|
||||
{
|
||||
struct device_node *np = dev->pdev->dev.of_node;
|
||||
struct device_node *np = dev->dev->of_node;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
uint32_t mcr_cfg, mcr_scu_mpll, mcr_scu_strap;
|
||||
uint32_t denum, num, div, ref_pll, dsel;
|
||||
|
@ -409,10 +411,9 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,
|
|||
return ast;
|
||||
dev = &ast->base;
|
||||
|
||||
dev->pdev = pdev;
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
ast->regs = pci_iomap(dev->pdev, 1, 0);
|
||||
ast->regs = pci_iomap(pdev, 1, 0);
|
||||
if (!ast->regs)
|
||||
return ERR_PTR(-EIO);
|
||||
|
||||
|
@ -421,14 +422,14 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,
|
|||
* assume the chip has MMIO enabled by default (rev 0x20
|
||||
* and higher).
|
||||
*/
|
||||
if (!(pci_resource_flags(dev->pdev, 2) & IORESOURCE_IO)) {
|
||||
if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
|
||||
drm_info(dev, "platform has no IO space, trying MMIO\n");
|
||||
ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
|
||||
}
|
||||
|
||||
/* "map" IO regs if the above hasn't done so already */
|
||||
if (!ast->ioregs) {
|
||||
ast->ioregs = pci_iomap(dev->pdev, 2, 0);
|
||||
ast->ioregs = pci_iomap(pdev, 2, 0);
|
||||
if (!ast->ioregs)
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
|
|
|
@ -77,31 +77,32 @@ static u32 ast_get_vram_size(struct ast_private *ast)
|
|||
static void ast_mm_release(struct drm_device *dev, void *ptr)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
arch_phys_wc_del(ast->fb_mtrr);
|
||||
arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0));
|
||||
arch_io_free_memtype_wc(pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0));
|
||||
}
|
||||
|
||||
int ast_mm_init(struct ast_private *ast)
|
||||
{
|
||||
struct drm_device *dev = &ast->base;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
u32 vram_size;
|
||||
int ret;
|
||||
|
||||
vram_size = ast_get_vram_size(ast);
|
||||
|
||||
ret = drmm_vram_helper_init(dev, pci_resource_start(dev->pdev, 0),
|
||||
vram_size);
|
||||
ret = drmm_vram_helper_init(dev, pci_resource_start(pdev, 0), vram_size);
|
||||
if (ret) {
|
||||
drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0));
|
||||
ast->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0));
|
||||
arch_io_reserve_memtype_wc(pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0));
|
||||
ast->fb_mtrr = arch_phys_wc_add(pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0));
|
||||
|
||||
return drmm_add_action_or_reset(dev, ast_mm_release, NULL);
|
||||
}
|
||||
|
|
|
@ -1106,6 +1106,7 @@ static const struct drm_mode_config_funcs ast_mode_config_funcs = {
|
|||
int ast_mode_config_init(struct ast_private *ast)
|
||||
{
|
||||
struct drm_device *dev = &ast->base;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
int ret;
|
||||
|
||||
ret = ast_cursor_init(ast);
|
||||
|
@ -1121,7 +1122,7 @@ int ast_mode_config_init(struct ast_private *ast)
|
|||
dev->mode_config.min_height = 0;
|
||||
dev->mode_config.preferred_depth = 24;
|
||||
dev->mode_config.prefer_shadow = 1;
|
||||
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0);
|
||||
dev->mode_config.fb_base = pci_resource_start(pdev, 0);
|
||||
|
||||
if (ast->chip == AST2100 ||
|
||||
ast->chip == AST2200 ||
|
||||
|
@ -1258,7 +1259,7 @@ static struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev)
|
|||
|
||||
i2c->adapter.owner = THIS_MODULE;
|
||||
i2c->adapter.class = I2C_CLASS_DDC;
|
||||
i2c->adapter.dev.parent = &dev->pdev->dev;
|
||||
i2c->adapter.dev.parent = dev->dev;
|
||||
i2c->dev = dev;
|
||||
i2c_set_adapdata(&i2c->adapter, i2c);
|
||||
snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
|
||||
|
|
|
@ -71,6 +71,7 @@ static void
|
|||
ast_set_def_ext_reg(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
u8 i, index, reg;
|
||||
const u8 *ext_reg_info;
|
||||
|
||||
|
@ -80,7 +81,7 @@ ast_set_def_ext_reg(struct drm_device *dev)
|
|||
|
||||
if (ast->chip == AST2300 || ast->chip == AST2400 ||
|
||||
ast->chip == AST2500) {
|
||||
if (dev->pdev->revision >= 0x20)
|
||||
if (pdev->revision >= 0x20)
|
||||
ext_reg_info = extreginfo_ast2300;
|
||||
else
|
||||
ext_reg_info = extreginfo_ast2300a0;
|
||||
|
@ -366,11 +367,12 @@ static void ast_init_dram_reg(struct drm_device *dev)
|
|||
void ast_post_gpu(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
u32 reg;
|
||||
|
||||
pci_read_config_dword(dev->pdev, 0x04, ®);
|
||||
pci_read_config_dword(pdev, 0x04, ®);
|
||||
reg |= 0x3;
|
||||
pci_write_config_dword(dev->pdev, 0x04, reg);
|
||||
pci_write_config_dword(pdev, 0x04, reg);
|
||||
|
||||
ast_enable_vga(dev);
|
||||
ast_open_key(ast);
|
||||
|
|
|
@ -121,7 +121,6 @@ static int bochs_pci_probe(struct pci_dev *pdev,
|
|||
if (ret)
|
||||
goto err_free_dev;
|
||||
|
||||
dev->pdev = pdev;
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
||||
ret = bochs_load(dev);
|
||||
|
|
|
@ -110,7 +110,7 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
|
|||
int bochs_hw_init(struct drm_device *dev)
|
||||
{
|
||||
struct bochs_device *bochs = dev->dev_private;
|
||||
struct pci_dev *pdev = dev->pdev;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
unsigned long addr, size, mem, ioaddr, iosize;
|
||||
u16 id;
|
||||
|
||||
|
@ -201,7 +201,7 @@ void bochs_hw_fini(struct drm_device *dev)
|
|||
release_region(VBE_DISPI_IOPORT_INDEX, 2);
|
||||
if (bochs->fb_map)
|
||||
iounmap(bochs->fb_map);
|
||||
pci_release_regions(dev->pdev);
|
||||
pci_release_regions(to_pci_dev(dev->dev));
|
||||
kfree(bochs->edid);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,13 +45,9 @@
|
|||
|
||||
#include "drm_legacy.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get AGP information.
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv DRM file private.
|
||||
* \param cmd command.
|
||||
* \param arg pointer to a (output) drm_agp_info structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device has been initialized and acquired and fills in the
|
||||
|
@ -92,7 +88,7 @@ int drm_agp_info_ioctl(struct drm_device *dev, void *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Acquire the AGP device.
|
||||
*
|
||||
* \param dev DRM device that is to acquire AGP.
|
||||
|
@ -103,11 +99,13 @@ int drm_agp_info_ioctl(struct drm_device *dev, void *data,
|
|||
*/
|
||||
int drm_agp_acquire(struct drm_device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
if (!dev->agp)
|
||||
return -ENODEV;
|
||||
if (dev->agp->acquired)
|
||||
return -EBUSY;
|
||||
dev->agp->bridge = agp_backend_acquire(dev->pdev);
|
||||
dev->agp->bridge = agp_backend_acquire(pdev);
|
||||
if (!dev->agp->bridge)
|
||||
return -ENODEV;
|
||||
dev->agp->acquired = 1;
|
||||
|
@ -115,13 +113,9 @@ int drm_agp_acquire(struct drm_device *dev)
|
|||
}
|
||||
EXPORT_SYMBOL(drm_agp_acquire);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Acquire the AGP device (ioctl).
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv DRM file private.
|
||||
* \param cmd command.
|
||||
* \param arg user argument.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device hasn't been acquired before and calls
|
||||
|
@ -133,7 +127,7 @@ int drm_agp_acquire_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_acquire((struct drm_device *) file_priv->minor->dev);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Release the AGP device.
|
||||
*
|
||||
* \param dev DRM device that is to release AGP.
|
||||
|
@ -157,7 +151,7 @@ int drm_agp_release_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_release(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Enable the AGP bus.
|
||||
*
|
||||
* \param dev DRM device that has previously acquired AGP.
|
||||
|
@ -187,13 +181,9 @@ int drm_agp_enable_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_enable(dev, *mode);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Allocate AGP memory.
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv file private pointer.
|
||||
* \param cmd command.
|
||||
* \param arg pointer to a drm_agp_buffer structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device is present and has been acquired, allocates the
|
||||
|
@ -242,7 +232,7 @@ int drm_agp_alloc_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_alloc(dev, request);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Search for the AGP memory entry associated with a handle.
|
||||
*
|
||||
* \param dev DRM device structure.
|
||||
|
@ -263,13 +253,9 @@ static struct drm_agp_mem *drm_agp_lookup_entry(struct drm_device *dev,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Unbind AGP memory from the GATT (ioctl).
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv DRM file private.
|
||||
* \param cmd command.
|
||||
* \param arg pointer to a drm_agp_binding structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device is present and acquired, looks-up the AGP memory
|
||||
|
@ -285,7 +271,7 @@ int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request)
|
|||
entry = drm_agp_lookup_entry(dev, request->handle);
|
||||
if (!entry || !entry->bound)
|
||||
return -EINVAL;
|
||||
ret = drm_unbind_agp(entry->memory);
|
||||
ret = agp_unbind_memory(entry->memory);
|
||||
if (ret == 0)
|
||||
entry->bound = 0;
|
||||
return ret;
|
||||
|
@ -301,13 +287,9 @@ int drm_agp_unbind_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_unbind(dev, request);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Bind AGP memory into the GATT (ioctl)
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv DRM file private.
|
||||
* \param cmd command.
|
||||
* \param arg pointer to a drm_agp_binding structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device is present and has been acquired and that no memory
|
||||
|
@ -326,7 +308,7 @@ int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request)
|
|||
if (!entry || entry->bound)
|
||||
return -EINVAL;
|
||||
page = DIV_ROUND_UP(request->offset, PAGE_SIZE);
|
||||
retcode = drm_bind_agp(entry->memory, page);
|
||||
retcode = agp_bind_memory(entry->memory, page);
|
||||
if (retcode)
|
||||
return retcode;
|
||||
entry->bound = dev->agp->base + (page << PAGE_SHIFT);
|
||||
|
@ -345,13 +327,9 @@ int drm_agp_bind_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_bind(dev, request);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Free AGP memory (ioctl).
|
||||
*
|
||||
* \param inode device inode.
|
||||
* \param file_priv DRM file private.
|
||||
* \param cmd command.
|
||||
* \param arg pointer to a drm_agp_buffer structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Verifies the AGP device is present and has been acquired and looks up the
|
||||
|
@ -369,11 +347,11 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
|
|||
if (!entry)
|
||||
return -EINVAL;
|
||||
if (entry->bound)
|
||||
drm_unbind_agp(entry->memory);
|
||||
agp_unbind_memory(entry->memory);
|
||||
|
||||
list_del(&entry->head);
|
||||
|
||||
drm_free_agp(entry->memory, entry->pages);
|
||||
agp_free_memory(entry->memory);
|
||||
kfree(entry);
|
||||
return 0;
|
||||
}
|
||||
|
@ -388,7 +366,7 @@ int drm_agp_free_ioctl(struct drm_device *dev, void *data,
|
|||
return drm_agp_free(dev, request);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initialize the AGP resources.
|
||||
*
|
||||
* \return pointer to a drm_agp_head structure.
|
||||
|
@ -402,14 +380,15 @@ int drm_agp_free_ioctl(struct drm_device *dev, void *data,
|
|||
*/
|
||||
struct drm_agp_head *drm_agp_init(struct drm_device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct drm_agp_head *head = NULL;
|
||||
|
||||
head = kzalloc(sizeof(*head), GFP_KERNEL);
|
||||
if (!head)
|
||||
return NULL;
|
||||
head->bridge = agp_find_bridge(dev->pdev);
|
||||
head->bridge = agp_find_bridge(pdev);
|
||||
if (!head->bridge) {
|
||||
head->bridge = agp_backend_acquire(dev->pdev);
|
||||
head->bridge = agp_backend_acquire(pdev);
|
||||
if (!head->bridge) {
|
||||
kfree(head);
|
||||
return NULL;
|
||||
|
@ -453,8 +432,8 @@ void drm_legacy_agp_clear(struct drm_device *dev)
|
|||
|
||||
list_for_each_entry_safe(entry, tempe, &dev->agp->memory, head) {
|
||||
if (entry->bound)
|
||||
drm_unbind_agp(entry->memory);
|
||||
drm_free_agp(entry->memory, entry->pages);
|
||||
agp_unbind_memory(entry->memory);
|
||||
agp_free_memory(entry->memory);
|
||||
kfree(entry);
|
||||
}
|
||||
INIT_LIST_HEAD(&dev->agp->memory);
|
||||
|
|
|
@ -326,7 +326,7 @@ static int drm_addmap_core(struct drm_device *dev, resource_size_t offset,
|
|||
* As we're limiting the address to 2^32-1 (or less),
|
||||
* casting it down to 32 bits is no problem, but we
|
||||
* need to point to a 64bit variable first. */
|
||||
map->handle = dma_alloc_coherent(&dev->pdev->dev,
|
||||
map->handle = dma_alloc_coherent(dev->dev,
|
||||
map->size,
|
||||
&map->offset,
|
||||
GFP_KERNEL);
|
||||
|
@ -556,7 +556,7 @@ int drm_legacy_rmmap_locked(struct drm_device *dev, struct drm_local_map *map)
|
|||
case _DRM_SCATTER_GATHER:
|
||||
break;
|
||||
case _DRM_CONSISTENT:
|
||||
dma_free_coherent(&dev->pdev->dev,
|
||||
dma_free_coherent(dev->dev,
|
||||
map->size,
|
||||
map->handle,
|
||||
map->offset);
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <linux/export.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/mem_encrypt.h>
|
||||
#include <xen/xen.h>
|
||||
|
||||
#include <drm/drm_cache.h>
|
||||
|
||||
|
@ -176,3 +178,34 @@ drm_clflush_virt_range(void *addr, unsigned long length)
|
|||
#endif
|
||||
}
|
||||
EXPORT_SYMBOL(drm_clflush_virt_range);
|
||||
|
||||
bool drm_need_swiotlb(int dma_bits)
|
||||
{
|
||||
struct resource *tmp;
|
||||
resource_size_t max_iomem = 0;
|
||||
|
||||
/*
|
||||
* Xen paravirtual hosts require swiotlb regardless of requested dma
|
||||
* transfer size.
|
||||
*
|
||||
* NOTE: Really, what it requires is use of the dma_alloc_coherent
|
||||
* allocator used in ttm_dma_populate() instead of
|
||||
* ttm_populate_and_map_pages(), which bounce buffers so much in
|
||||
* Xen it leads to swiotlb buffer exhaustion.
|
||||
*/
|
||||
if (xen_pv_domain())
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Enforce dma_alloc_coherent when memory encryption is active as well
|
||||
* for the same reasons as for Xen paravirtual hosts.
|
||||
*/
|
||||
if (mem_encrypt_active())
|
||||
return true;
|
||||
|
||||
for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling)
|
||||
max_iomem = max(max_iomem, tmp->end);
|
||||
|
||||
return max_iomem > ((u64)1 << dma_bits);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_need_swiotlb);
|
||||
|
|
|
@ -954,7 +954,7 @@ EXPORT_SYMBOL(drm_dp_downstream_444_to_420_conversion);
|
|||
* RGB->YCbCr conversion capability
|
||||
* @dpcd: DisplayPort configuration data
|
||||
* @port_cap: downstream facing port capabilities
|
||||
* @colorspc: Colorspace for which conversion cap is sought
|
||||
* @color_spc: Colorspace for which conversion cap is sought
|
||||
*
|
||||
* Returns: whether the downstream facing port can convert RGB->YCbCr for a given
|
||||
* colorspace.
|
||||
|
@ -2671,6 +2671,7 @@ EXPORT_SYMBOL(drm_dp_get_pcon_max_frl_bw);
|
|||
/**
|
||||
* drm_dp_pcon_frl_prepare() - Prepare PCON for FRL.
|
||||
* @aux: DisplayPort AUX channel
|
||||
* @enable_frl_ready_hpd: Configure DP_PCON_ENABLE_HPD_READY.
|
||||
*
|
||||
* Returns 0 if success, else returns negative error code.
|
||||
*/
|
||||
|
|
|
@ -2751,7 +2751,7 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)
|
|||
drm_dp_mst_topology_put_mstb(mstb);
|
||||
|
||||
mutex_unlock(&mgr->probe_lock);
|
||||
if (ret)
|
||||
if (ret > 0)
|
||||
drm_kms_helper_hotplug_event(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -469,6 +469,9 @@ void drm_dev_unplug(struct drm_device *dev)
|
|||
synchronize_srcu(&drm_unplug_srcu);
|
||||
|
||||
drm_dev_unregister(dev);
|
||||
|
||||
/* Clear all CPU mappings pointing to this device */
|
||||
unmap_mapping_range(dev->anon_inode->i_mapping, 0, 0, 1);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_dev_unplug);
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <linux/i2c.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/vga_switcheroo.h>
|
||||
|
||||
|
@ -2075,9 +2076,13 @@ EXPORT_SYMBOL(drm_get_edid);
|
|||
struct edid *drm_get_edid_switcheroo(struct drm_connector *connector,
|
||||
struct i2c_adapter *adapter)
|
||||
{
|
||||
struct pci_dev *pdev = connector->dev->pdev;
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct edid *edid;
|
||||
|
||||
if (drm_WARN_ON_ONCE(dev, !dev_is_pci(dev->dev)))
|
||||
return NULL;
|
||||
|
||||
vga_switcheroo_lock_ddc(pdev);
|
||||
edid = drm_get_edid(connector, adapter);
|
||||
vga_switcheroo_unlock_ddc(pdev);
|
||||
|
|
|
@ -239,9 +239,6 @@ static void drm_events_release(struct drm_file *file_priv)
|
|||
* before calling this.
|
||||
*
|
||||
* If NULL is passed, this is a no-op.
|
||||
*
|
||||
* RETURNS:
|
||||
* 0 on success, or error code on failure.
|
||||
*/
|
||||
void drm_file_free(struct drm_file *file)
|
||||
{
|
||||
|
@ -370,6 +367,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
|
|||
list_add(&priv->lhead, &dev->filelist);
|
||||
mutex_unlock(&dev->filelist_mutex);
|
||||
|
||||
#ifdef CONFIG_DRM_LEGACY
|
||||
#ifdef __alpha__
|
||||
/*
|
||||
* Default the hose
|
||||
|
@ -389,6 +387,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
|
|||
dev->hose = b->sysdata;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1068,20 +1068,17 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
|
|||
drm_gem_object_get(obj);
|
||||
|
||||
vma->vm_private_data = obj;
|
||||
vma->vm_ops = obj->funcs->vm_ops;
|
||||
|
||||
if (obj->funcs->mmap) {
|
||||
ret = obj->funcs->mmap(obj, vma);
|
||||
if (ret) {
|
||||
drm_gem_object_put(obj);
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
goto err_drm_gem_object_put;
|
||||
WARN_ON(!(vma->vm_flags & VM_DONTEXPAND));
|
||||
} else {
|
||||
if (obj->funcs->vm_ops)
|
||||
vma->vm_ops = obj->funcs->vm_ops;
|
||||
else {
|
||||
drm_gem_object_put(obj);
|
||||
return -EINVAL;
|
||||
if (!vma->vm_ops) {
|
||||
ret = -EINVAL;
|
||||
goto err_drm_gem_object_put;
|
||||
}
|
||||
|
||||
vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
|
||||
|
@ -1090,6 +1087,10 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
|
|||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_drm_gem_object_put:
|
||||
drm_gem_object_put(obj);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_gem_mmap_obj);
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ int drm_irq_install(struct drm_device *dev, int irq)
|
|||
dev->driver->irq_preinstall(dev);
|
||||
|
||||
/* PCI devices require shared interrupts. */
|
||||
if (dev->pdev)
|
||||
if (dev_is_pci(dev->dev))
|
||||
sh_flags = IRQF_SHARED;
|
||||
|
||||
ret = request_irq(irq, dev->driver->irq_handler,
|
||||
|
@ -140,7 +140,7 @@ int drm_irq_install(struct drm_device *dev, int irq)
|
|||
if (ret < 0) {
|
||||
dev->irq_enabled = false;
|
||||
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||
vga_client_register(dev->pdev, NULL, NULL, NULL);
|
||||
vga_client_register(to_pci_dev(dev->dev), NULL, NULL, NULL);
|
||||
free_irq(irq, dev);
|
||||
} else {
|
||||
dev->irq = irq;
|
||||
|
@ -203,7 +203,7 @@ int drm_irq_uninstall(struct drm_device *dev)
|
|||
DRM_DEBUG("irq=%d\n", dev->irq);
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||
vga_client_register(dev->pdev, NULL, NULL, NULL);
|
||||
vga_client_register(to_pci_dev(dev->dev), NULL, NULL, NULL);
|
||||
|
||||
if (dev->driver->irq_uninstall)
|
||||
dev->driver->irq_uninstall(dev);
|
||||
|
@ -252,6 +252,7 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,
|
|||
{
|
||||
struct drm_control *ctl = data;
|
||||
int ret = 0, irq;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
/* if we haven't irq we fallback for compatibility reasons -
|
||||
* this used to be a separate function in drm_dma.h
|
||||
|
@ -262,12 +263,13 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,
|
|||
if (!drm_core_check_feature(dev, DRIVER_LEGACY))
|
||||
return 0;
|
||||
/* UMS was only ever supported on pci devices. */
|
||||
if (WARN_ON(!dev->pdev))
|
||||
if (WARN_ON(!dev_is_pci(dev->dev)))
|
||||
return -EINVAL;
|
||||
|
||||
switch (ctl->func) {
|
||||
case DRM_INST_HANDLER:
|
||||
irq = dev->pdev->irq;
|
||||
pdev = to_pci_dev(dev->dev);
|
||||
irq = pdev->irq;
|
||||
|
||||
if (dev->if_version < DRM_IF_VERSION(1, 2) &&
|
||||
ctl->irq != irq)
|
||||
|
|
|
@ -127,7 +127,7 @@ static inline void drm_legacy_master_rmmaps(struct drm_device *dev,
|
|||
static inline void drm_legacy_rmmaps(struct drm_device *dev) {}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_DRM_VM) && IS_ENABLED(CONFIG_DRM_LEGACY)
|
||||
#if IS_ENABLED(CONFIG_DRM_LEGACY)
|
||||
void drm_legacy_vma_flush(struct drm_device *d);
|
||||
#else
|
||||
static inline void drm_legacy_vma_flush(struct drm_device *d)
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <linux/highmem.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <xen/xen.h>
|
||||
|
||||
#include <drm/drm_agpsupport.h>
|
||||
#include <drm/drm_cache.h>
|
||||
|
@ -100,24 +99,6 @@ static void *agp_remap(unsigned long offset, unsigned long size,
|
|||
return addr;
|
||||
}
|
||||
|
||||
/** Wrapper around agp_free_memory() */
|
||||
void drm_free_agp(struct agp_memory *handle, int pages)
|
||||
{
|
||||
agp_free_memory(handle);
|
||||
}
|
||||
|
||||
/** Wrapper around agp_bind_memory() */
|
||||
int drm_bind_agp(struct agp_memory *handle, unsigned int start)
|
||||
{
|
||||
return agp_bind_memory(handle, start);
|
||||
}
|
||||
|
||||
/** Wrapper around agp_unbind_memory() */
|
||||
int drm_unbind_agp(struct agp_memory *handle)
|
||||
{
|
||||
return agp_unbind_memory(handle);
|
||||
}
|
||||
|
||||
#else /* CONFIG_AGP */
|
||||
static inline void *agp_remap(unsigned long offset, unsigned long size,
|
||||
struct drm_device *dev)
|
||||
|
@ -156,35 +137,3 @@ void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev)
|
|||
iounmap(map->handle);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_legacy_ioremapfree);
|
||||
|
||||
bool drm_need_swiotlb(int dma_bits)
|
||||
{
|
||||
struct resource *tmp;
|
||||
resource_size_t max_iomem = 0;
|
||||
|
||||
/*
|
||||
* Xen paravirtual hosts require swiotlb regardless of requested dma
|
||||
* transfer size.
|
||||
*
|
||||
* NOTE: Really, what it requires is use of the dma_alloc_coherent
|
||||
* allocator used in ttm_dma_populate() instead of
|
||||
* ttm_populate_and_map_pages(), which bounce buffers so much in
|
||||
* Xen it leads to swiotlb buffer exhaustion.
|
||||
*/
|
||||
if (xen_pv_domain())
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Enforce dma_alloc_coherent when memory encryption is active as well
|
||||
* for the same reasons as for Xen paravirtual hosts.
|
||||
*/
|
||||
if (mem_encrypt_active())
|
||||
return true;
|
||||
|
||||
for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
|
||||
max_iomem = max(max_iomem, tmp->end);
|
||||
}
|
||||
|
||||
return max_iomem > ((u64)1 << dma_bits);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_need_swiotlb);
|
||||
|
|
|
@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
|
|||
if (mode->htotal == 0 || mode->vtotal == 0)
|
||||
return 0;
|
||||
|
||||
num = mode->clock * 1000;
|
||||
num = mode->clock;
|
||||
den = mode->htotal * mode->vtotal;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
|
||||
|
@ -772,7 +772,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
|
|||
if (mode->vscan > 1)
|
||||
den *= mode->vscan;
|
||||
|
||||
return DIV_ROUND_CLOSEST(num, den);
|
||||
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_mode_vrefresh);
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali
|
|||
return NULL;
|
||||
|
||||
dmah->size = size;
|
||||
dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size,
|
||||
dmah->vaddr = dma_alloc_coherent(dev->dev, size,
|
||||
&dmah->busaddr,
|
||||
GFP_KERNEL);
|
||||
|
||||
|
@ -93,7 +93,7 @@ EXPORT_SYMBOL(drm_pci_alloc);
|
|||
*/
|
||||
void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
|
||||
{
|
||||
dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr,
|
||||
dma_free_coherent(dev->dev, dmah->size, dmah->vaddr,
|
||||
dmah->busaddr);
|
||||
kfree(dmah);
|
||||
}
|
||||
|
@ -112,16 +112,18 @@ static int drm_get_pci_domain(struct drm_device *dev)
|
|||
return 0;
|
||||
#endif /* __alpha__ */
|
||||
|
||||
return pci_domain_nr(dev->pdev->bus);
|
||||
return pci_domain_nr(to_pci_dev(dev->dev)->bus);
|
||||
}
|
||||
|
||||
int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
master->unique = kasprintf(GFP_KERNEL, "pci:%04x:%02x:%02x.%d",
|
||||
drm_get_pci_domain(dev),
|
||||
dev->pdev->bus->number,
|
||||
PCI_SLOT(dev->pdev->devfn),
|
||||
PCI_FUNC(dev->pdev->devfn));
|
||||
pdev->bus->number,
|
||||
PCI_SLOT(pdev->devfn),
|
||||
PCI_FUNC(pdev->devfn));
|
||||
if (!master->unique)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -131,12 +133,14 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
|
|||
|
||||
static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
if ((p->busnum >> 8) != drm_get_pci_domain(dev) ||
|
||||
(p->busnum & 0xff) != dev->pdev->bus->number ||
|
||||
p->devnum != PCI_SLOT(dev->pdev->devfn) || p->funcnum != PCI_FUNC(dev->pdev->devfn))
|
||||
(p->busnum & 0xff) != pdev->bus->number ||
|
||||
p->devnum != PCI_SLOT(pdev->devfn) || p->funcnum != PCI_FUNC(pdev->devfn))
|
||||
return -EINVAL;
|
||||
|
||||
p->irq = dev->pdev->irq;
|
||||
p->irq = pdev->irq;
|
||||
|
||||
DRM_DEBUG("%d:%d:%d => IRQ %d\n", p->busnum, p->devnum, p->funcnum,
|
||||
p->irq);
|
||||
|
@ -164,7 +168,7 @@ int drm_legacy_irq_by_busid(struct drm_device *dev, void *data,
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
/* UMS was only ever support on PCI devices. */
|
||||
if (WARN_ON(!dev->pdev))
|
||||
if (WARN_ON(!dev_is_pci(dev->dev)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
|
||||
|
@ -188,7 +192,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)
|
|||
static void drm_pci_agp_init(struct drm_device *dev)
|
||||
{
|
||||
if (drm_core_check_feature(dev, DRIVER_USE_AGP)) {
|
||||
if (pci_find_capability(dev->pdev, PCI_CAP_ID_AGP))
|
||||
if (pci_find_capability(to_pci_dev(dev->dev), PCI_CAP_ID_AGP))
|
||||
dev->agp = drm_agp_init(dev);
|
||||
if (dev->agp) {
|
||||
dev->agp->agp_mtrr = arch_phys_wc_add(
|
||||
|
|
|
@ -717,6 +717,8 @@ int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
|
|||
vma->vm_pgoff += drm_vma_node_start(&obj->vma_node);
|
||||
|
||||
if (obj->funcs && obj->funcs->mmap) {
|
||||
vma->vm_ops = obj->funcs->vm_ops;
|
||||
|
||||
ret = obj->funcs->mmap(obj, vma);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
* |↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓| updates the
|
||||
* | | frame as it
|
||||
* | | travels down
|
||||
* | | ("sacn out")
|
||||
* | | ("scan out")
|
||||
* | Old frame |
|
||||
* | |
|
||||
* | |
|
||||
|
|
|
@ -278,7 +278,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
|
|||
case _DRM_SCATTER_GATHER:
|
||||
break;
|
||||
case _DRM_CONSISTENT:
|
||||
dma_free_coherent(&dev->pdev->dev,
|
||||
dma_free_coherent(dev->dev,
|
||||
map->size,
|
||||
map->handle,
|
||||
map->offset);
|
||||
|
|
|
@ -95,13 +95,14 @@ static u32 cdv_get_max_backlight(struct drm_device *dev)
|
|||
static int cdv_get_brightness(struct backlight_device *bd)
|
||||
{
|
||||
struct drm_device *dev = bl_get_data(bd);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
u32 val = REG_READ(BLC_PWM_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
|
||||
|
||||
if (cdv_backlight_combination_mode(dev)) {
|
||||
u8 lbpc;
|
||||
|
||||
val &= ~1;
|
||||
pci_read_config_byte(dev->pdev, 0xF4, &lbpc);
|
||||
pci_read_config_byte(pdev, 0xF4, &lbpc);
|
||||
val *= lbpc;
|
||||
}
|
||||
return (val * 100)/cdv_get_max_backlight(dev);
|
||||
|
@ -111,6 +112,7 @@ static int cdv_get_brightness(struct backlight_device *bd)
|
|||
static int cdv_set_brightness(struct backlight_device *bd)
|
||||
{
|
||||
struct drm_device *dev = bl_get_data(bd);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
int level = bd->props.brightness;
|
||||
u32 blc_pwm_ctl;
|
||||
|
||||
|
@ -128,7 +130,7 @@ static int cdv_set_brightness(struct backlight_device *bd)
|
|||
lbpc = level * 0xfe / max + 1;
|
||||
level /= lbpc;
|
||||
|
||||
pci_write_config_byte(dev->pdev, 0xF4, lbpc);
|
||||
pci_write_config_byte(pdev, 0xF4, lbpc);
|
||||
}
|
||||
|
||||
blc_pwm_ctl = REG_READ(BLC_PWM_CTL) & ~BACKLIGHT_DUTY_CYCLE_MASK;
|
||||
|
@ -205,8 +207,9 @@ static inline void CDV_MSG_WRITE32(int domain, uint port, uint offset,
|
|||
static void cdv_init_pm(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
u32 pwr_cnt;
|
||||
int domain = pci_domain_nr(dev->pdev->bus);
|
||||
int domain = pci_domain_nr(pdev->bus);
|
||||
int i;
|
||||
|
||||
dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
|
||||
|
@ -234,6 +237,8 @@ static void cdv_init_pm(struct drm_device *dev)
|
|||
|
||||
static void cdv_errata(struct drm_device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
/* Disable bonus launch.
|
||||
* CPU and GPU competes for memory and display misses updates and
|
||||
* flickers. Worst with dual core, dual displays.
|
||||
|
@ -242,7 +247,7 @@ static void cdv_errata(struct drm_device *dev)
|
|||
* Bonus Launch to work around the issue, by degrading
|
||||
* performance.
|
||||
*/
|
||||
CDV_MSG_WRITE32(pci_domain_nr(dev->pdev->bus), 3, 0x30, 0x08027108);
|
||||
CDV_MSG_WRITE32(pci_domain_nr(pdev->bus), 3, 0x30, 0x08027108);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -255,12 +260,13 @@ static void cdv_errata(struct drm_device *dev)
|
|||
static int cdv_save_display_registers(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct psb_save_area *regs = &dev_priv->regs;
|
||||
struct drm_connector *connector;
|
||||
|
||||
dev_dbg(dev->dev, "Saving GPU registers.\n");
|
||||
|
||||
pci_read_config_byte(dev->pdev, 0xF4, ®s->cdv.saveLBB);
|
||||
pci_read_config_byte(pdev, 0xF4, ®s->cdv.saveLBB);
|
||||
|
||||
regs->cdv.saveDSPCLK_GATE_D = REG_READ(DSPCLK_GATE_D);
|
||||
regs->cdv.saveRAMCLK_GATE_D = REG_READ(RAMCLK_GATE_D);
|
||||
|
@ -309,11 +315,12 @@ static int cdv_save_display_registers(struct drm_device *dev)
|
|||
static int cdv_restore_display_registers(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct psb_save_area *regs = &dev_priv->regs;
|
||||
struct drm_connector *connector;
|
||||
u32 temp;
|
||||
|
||||
pci_write_config_byte(dev->pdev, 0xF4, regs->cdv.saveLBB);
|
||||
pci_write_config_byte(pdev, 0xF4, regs->cdv.saveLBB);
|
||||
|
||||
REG_WRITE(DSPCLK_GATE_D, regs->cdv.saveDSPCLK_GATE_D);
|
||||
REG_WRITE(RAMCLK_GATE_D, regs->cdv.saveRAMCLK_GATE_D);
|
||||
|
@ -421,16 +428,16 @@ static int cdv_power_up(struct drm_device *dev)
|
|||
static void cdv_hotplug_work_func(struct work_struct *work)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = container_of(work, struct drm_psb_private,
|
||||
hotplug_work);
|
||||
hotplug_work);
|
||||
struct drm_device *dev = dev_priv->dev;
|
||||
|
||||
/* Just fire off a uevent and let userspace tell us what to do */
|
||||
drm_helper_hpd_irq_event(dev);
|
||||
}
|
||||
}
|
||||
|
||||
/* The core driver has received a hotplug IRQ. We are in IRQ context
|
||||
so extract the needed information and kick off queued processing */
|
||||
|
||||
|
||||
static int cdv_hotplug_event(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
|
@ -449,7 +456,7 @@ static void cdv_hotplug_enable(struct drm_device *dev, bool on)
|
|||
} else {
|
||||
REG_WRITE(PORT_HOTPLUG_EN, 0);
|
||||
REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const char *force_audio_names[] = {
|
||||
|
@ -568,9 +575,10 @@ static const struct psb_offset cdv_regmap[2] = {
|
|||
static int cdv_chip_setup(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
INIT_WORK(&dev_priv->hotplug_work, cdv_hotplug_work_func);
|
||||
|
||||
if (pci_enable_msi(dev->pdev))
|
||||
if (pci_enable_msi(pdev))
|
||||
dev_warn(dev->dev, "Enabling MSI failed!\n");
|
||||
dev_priv->regmap = cdv_regmap;
|
||||
gma_get_core_freq(dev);
|
||||
|
|
|
@ -127,7 +127,7 @@ static void cdv_intel_crt_mode_set(struct drm_encoder *encoder,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect CRT presence.
|
||||
*
|
||||
* \return true if CRT is connected.
|
||||
|
@ -278,8 +278,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
|
|||
gma_encoder->ddc_bus = psb_intel_i2c_create(dev,
|
||||
i2c_reg, "CRTDDC_A");
|
||||
if (!gma_encoder->ddc_bus) {
|
||||
dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration "
|
||||
"failed.\n");
|
||||
dev_printk(KERN_ERR, dev->dev, "DDC bus registration failed.\n");
|
||||
goto failed_ddc;
|
||||
}
|
||||
|
||||
|
|
|
@ -551,7 +551,7 @@ void cdv_update_wm(struct drm_device *dev, struct drm_crtc *crtc)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Return the pipe currently connected to the panel fitter,
|
||||
* or -1 if the panel fitter is not present or not in use
|
||||
*/
|
||||
|
|
|
@ -306,7 +306,7 @@ static uint32_t dp_vswing_premph_table[] = {
|
|||
};
|
||||
/**
|
||||
* is_edp - is the given port attached to an eDP panel (either CPU or PCH)
|
||||
* @intel_dp: DP struct
|
||||
* @encoder: GMA encoder struct
|
||||
*
|
||||
* If a CPU or PCH DP output is attached to an eDP panel, this function
|
||||
* will return true, and false otherwise.
|
||||
|
@ -1687,7 +1687,7 @@ static enum drm_connector_status cdv_dp_detect(struct gma_encoder *encoder)
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect DP connection.
|
||||
*
|
||||
* \return true if DP port is connected.
|
||||
|
|
|
@ -74,7 +74,7 @@ static u32 cdv_intel_lvds_get_max_backlight(struct drm_device *dev)
|
|||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets the backlight level.
|
||||
*
|
||||
* level backlight level, from 0 to cdv_intel_lvds_get_max_backlight().
|
||||
|
@ -99,7 +99,7 @@ static void cdv_intel_lvds_set_backlight(struct drm_device *dev, int level)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets the power state for the panel.
|
||||
*/
|
||||
static void cdv_intel_lvds_set_power(struct drm_device *dev,
|
||||
|
@ -291,7 +291,7 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder,
|
|||
REG_WRITE(PFIT_CONTROL, pfit_control);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
|
||||
*/
|
||||
static int cdv_intel_lvds_get_modes(struct drm_connector *connector)
|
||||
|
@ -471,6 +471,7 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev,
|
|||
/**
|
||||
* cdv_intel_lvds_init - setup LVDS connectors on this device
|
||||
* @dev: drm device
|
||||
* @mode_dev: PSB mode device
|
||||
*
|
||||
* Create the connector, register the LVDS DDC bus, and try to figure out what
|
||||
* modes we can display on the LVDS panel (if present).
|
||||
|
@ -554,7 +555,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
|
|||
"LVDSBLC_B");
|
||||
if (!gma_encoder->i2c_bus) {
|
||||
dev_printk(KERN_ERR,
|
||||
&dev->pdev->dev, "I2C bus registration failed.\n");
|
||||
dev->dev, "I2C bus registration failed.\n");
|
||||
goto failed_blc_i2c;
|
||||
}
|
||||
gma_encoder->i2c_bus->slave_addr = 0x2C;
|
||||
|
@ -575,7 +576,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,
|
|||
GPIOC,
|
||||
"LVDSDDC_C");
|
||||
if (!gma_encoder->ddc_bus) {
|
||||
dev_printk(KERN_ERR, &dev->pdev->dev,
|
||||
dev_printk(KERN_ERR, dev->dev,
|
||||
"DDC bus registration " "failed.\n");
|
||||
goto failed_ddc;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ static const struct fb_ops psbfb_unaccel_ops = {
|
|||
* @dev: our DRM device
|
||||
* @fb: framebuffer to set up
|
||||
* @mode_cmd: mode description
|
||||
* @gt: backing object
|
||||
* @obj: backing object
|
||||
*
|
||||
* Configure and fill in the boilerplate for our frame buffer. Return
|
||||
* 0 on success or an error code if we fail.
|
||||
|
@ -197,7 +197,7 @@ static int psb_framebuffer_init(struct drm_device *dev,
|
|||
* psb_framebuffer_create - create a framebuffer backed by gt
|
||||
* @dev: our DRM device
|
||||
* @mode_cmd: the description of the requested mode
|
||||
* @gt: the backing object
|
||||
* @obj: the backing object
|
||||
*
|
||||
* Create a framebuffer object backed by the gt, and fill in the
|
||||
* boilerplate required
|
||||
|
@ -252,7 +252,7 @@ static struct gtt_range *psbfb_alloc(struct drm_device *dev, int aligned_size)
|
|||
|
||||
/**
|
||||
* psbfb_create - create a framebuffer
|
||||
* @fbdev: the framebuffer device
|
||||
* @fb_helper: the framebuffer helper
|
||||
* @sizes: specification of the layout
|
||||
*
|
||||
* Create a framebuffer to the specifications provided
|
||||
|
@ -262,6 +262,7 @@ static int psbfb_create(struct drm_fb_helper *fb_helper,
|
|||
{
|
||||
struct drm_device *dev = fb_helper->dev;
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct fb_info *info;
|
||||
struct drm_framebuffer *fb;
|
||||
struct drm_mode_fb_cmd2 mode_cmd;
|
||||
|
@ -325,8 +326,8 @@ static int psbfb_create(struct drm_fb_helper *fb_helper,
|
|||
|
||||
drm_fb_helper_fill_info(info, fb_helper, sizes);
|
||||
|
||||
info->fix.mmio_start = pci_resource_start(dev->pdev, 0);
|
||||
info->fix.mmio_len = pci_resource_len(dev->pdev, 0);
|
||||
info->fix.mmio_start = pci_resource_start(pdev, 0);
|
||||
info->fix.mmio_len = pci_resource_len(pdev, 0);
|
||||
|
||||
/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
|
||||
|
||||
|
@ -529,6 +530,7 @@ void psb_modeset_init(struct drm_device *dev)
|
|||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct psb_intel_mode_device *mode_dev = &dev_priv->mode_dev;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
int i;
|
||||
|
||||
drm_mode_config_init(dev);
|
||||
|
@ -540,8 +542,7 @@ void psb_modeset_init(struct drm_device *dev)
|
|||
|
||||
/* set memory base */
|
||||
/* Oaktrail and Poulsbo should use BAR 2*/
|
||||
pci_read_config_dword(dev->pdev, PSB_BSM, (u32 *)
|
||||
&(dev->mode_config.fb_base));
|
||||
pci_read_config_dword(pdev, PSB_BSM, (u32 *)&(dev->mode_config.fb_base));
|
||||
|
||||
/* num pipes is 2 for PSB but 1 for Mrst */
|
||||
for (i = 0; i < dev_priv->num_pipe; i++)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <drm/drm.h>
|
||||
#include <drm/drm_vma_manager.h>
|
||||
|
||||
#include "gem.h"
|
||||
#include "psb_drv.h"
|
||||
|
||||
static vm_fault_t psb_gem_fault(struct vm_fault *vmf);
|
||||
|
@ -49,6 +50,8 @@ const struct drm_gem_object_funcs psb_gem_object_funcs = {
|
|||
* @dev: our device
|
||||
* @size: the size requested
|
||||
* @handlep: returned handle (opaque number)
|
||||
* @stolen: unused
|
||||
* @align: unused
|
||||
*
|
||||
* Create a GEM object, fill in the boilerplate and attach a handle to
|
||||
* it so that userspace can speak about it. This does the core work
|
||||
|
@ -97,7 +100,7 @@ int psb_gem_create(struct drm_file *file, struct drm_device *dev, u64 size,
|
|||
|
||||
/**
|
||||
* psb_gem_dumb_create - create a dumb buffer
|
||||
* @drm_file: our client file
|
||||
* @file: our client file
|
||||
* @dev: our device
|
||||
* @args: the requested arguments copied from userspace
|
||||
*
|
||||
|
@ -116,7 +119,6 @@ int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
|||
|
||||
/**
|
||||
* psb_gem_fault - pagefault handler for GEM objects
|
||||
* @vma: the VMA of the GEM object
|
||||
* @vmf: fault detail
|
||||
*
|
||||
* Invoked when a fault occurs on an mmap of a GEM managed area. GEM
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#ifndef _GEM_H
|
||||
#define _GEM_H
|
||||
|
||||
struct drm_device;
|
||||
|
||||
extern const struct drm_gem_object_funcs psb_gem_object_funcs;
|
||||
|
||||
extern int psb_gem_create(struct drm_file *file, struct drm_device *dev,
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
**************************************************************************/
|
||||
|
||||
#include "psb_drv.h"
|
||||
#include "gma_device.h"
|
||||
|
||||
void gma_get_core_freq(struct drm_device *dev)
|
||||
{
|
||||
uint32_t clock;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
struct pci_dev *pci_root =
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(dev->pdev->bus),
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
0, 0);
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "psb_intel_drv.h"
|
||||
#include "psb_intel_reg.h"
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns whether any output on the specified pipe is of the specified type
|
||||
*/
|
||||
bool gma_pipe_has_type(struct drm_crtc *crtc, int type)
|
||||
|
@ -180,7 +180,7 @@ int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets the power management mode of the pipe and plane.
|
||||
*
|
||||
* This code should probably grow support for turning the cursor off and back
|
||||
|
@ -559,14 +559,14 @@ int gma_crtc_set_config(struct drm_mode_set *set,
|
|||
if (!dev_priv->rpm_enabled)
|
||||
return drm_crtc_helper_set_config(set, ctx);
|
||||
|
||||
pm_runtime_forbid(&dev->pdev->dev);
|
||||
pm_runtime_forbid(dev->dev);
|
||||
ret = drm_crtc_helper_set_config(set, ctx);
|
||||
pm_runtime_allow(&dev->pdev->dev);
|
||||
pm_runtime_allow(dev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Save HW states of given crtc
|
||||
*/
|
||||
void gma_crtc_save(struct drm_crtc *crtc)
|
||||
|
@ -609,7 +609,7 @@ void gma_crtc_save(struct drm_crtc *crtc)
|
|||
crtc_state->savePalette[i] = REG_READ(palette_reg + (i << 2));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Restore HW states of given crtc
|
||||
*/
|
||||
void gma_crtc_restore(struct drm_crtc *crtc)
|
||||
|
|
|
@ -340,13 +340,14 @@ static void psb_gtt_alloc(struct drm_device *dev)
|
|||
void psb_gtt_takedown(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
if (dev_priv->gtt_map) {
|
||||
iounmap(dev_priv->gtt_map);
|
||||
dev_priv->gtt_map = NULL;
|
||||
}
|
||||
if (dev_priv->gtt_initialized) {
|
||||
pci_write_config_word(dev->pdev, PSB_GMCH_CTRL,
|
||||
pci_write_config_word(pdev, PSB_GMCH_CTRL,
|
||||
dev_priv->gmch_ctrl);
|
||||
PSB_WVDC32(dev_priv->pge_ctl, PSB_PGETBL_CTL);
|
||||
(void) PSB_RVDC32(PSB_PGETBL_CTL);
|
||||
|
@ -358,6 +359,7 @@ void psb_gtt_takedown(struct drm_device *dev)
|
|||
int psb_gtt_init(struct drm_device *dev, int resume)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
unsigned gtt_pages;
|
||||
unsigned long stolen_size, vram_stolen_size;
|
||||
unsigned i, num_pages;
|
||||
|
@ -376,8 +378,8 @@ int psb_gtt_init(struct drm_device *dev, int resume)
|
|||
pg = &dev_priv->gtt;
|
||||
|
||||
/* Enable the GTT */
|
||||
pci_read_config_word(dev->pdev, PSB_GMCH_CTRL, &dev_priv->gmch_ctrl);
|
||||
pci_write_config_word(dev->pdev, PSB_GMCH_CTRL,
|
||||
pci_read_config_word(pdev, PSB_GMCH_CTRL, &dev_priv->gmch_ctrl);
|
||||
pci_write_config_word(pdev, PSB_GMCH_CTRL,
|
||||
dev_priv->gmch_ctrl | _PSB_GMCH_ENABLED);
|
||||
|
||||
dev_priv->pge_ctl = PSB_RVDC32(PSB_PGETBL_CTL);
|
||||
|
@ -397,8 +399,8 @@ int psb_gtt_init(struct drm_device *dev, int resume)
|
|||
*/
|
||||
pg->mmu_gatt_start = 0xE0000000;
|
||||
|
||||
pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
|
||||
gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
|
||||
pg->gtt_start = pci_resource_start(pdev, PSB_GTT_RESOURCE);
|
||||
gtt_pages = pci_resource_len(pdev, PSB_GTT_RESOURCE)
|
||||
>> PAGE_SHIFT;
|
||||
/* CDV doesn't report this. In which case the system has 64 gtt pages */
|
||||
if (pg->gtt_start == 0 || gtt_pages == 0) {
|
||||
|
@ -407,10 +409,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
|
|||
pg->gtt_start = dev_priv->pge_ctl;
|
||||
}
|
||||
|
||||
pg->gatt_start = pci_resource_start(dev->pdev, PSB_GATT_RESOURCE);
|
||||
pg->gatt_pages = pci_resource_len(dev->pdev, PSB_GATT_RESOURCE)
|
||||
pg->gatt_start = pci_resource_start(pdev, PSB_GATT_RESOURCE);
|
||||
pg->gatt_pages = pci_resource_len(pdev, PSB_GATT_RESOURCE)
|
||||
>> PAGE_SHIFT;
|
||||
dev_priv->gtt_mem = &dev->pdev->resource[PSB_GATT_RESOURCE];
|
||||
dev_priv->gtt_mem = &pdev->resource[PSB_GATT_RESOURCE];
|
||||
|
||||
if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
|
||||
static struct resource fudge; /* Preferably peppermint */
|
||||
|
@ -431,7 +433,7 @@ int psb_gtt_init(struct drm_device *dev, int resume)
|
|||
dev_priv->gtt_mem = &fudge;
|
||||
}
|
||||
|
||||
pci_read_config_dword(dev->pdev, PSB_BSM, &dev_priv->stolen_base);
|
||||
pci_read_config_dword(pdev, PSB_BSM, &dev_priv->stolen_base);
|
||||
vram_stolen_size = pg->gtt_phys_start - dev_priv->stolen_base
|
||||
- PAGE_SIZE;
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче