Commit cb3cfbf7 authored by Daniel Vetter's avatar Daniel Vetter

Merge tag 'drm-misc-next-2021-01-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next for v5.12:

Core Changes:
- Lots of drm documentation updates by Simor Ser.
- Require that each crtc has a unique primary plane.
- Add fixme that fbdev_generic_setup is confusing.

Driver Changes:
- Update addresses for TI display drivers maintainers.
- Make DRM_VIRTIO_GPU select VIRTIO.
- Small fixes to qxl, virtio, hisilicon, tve200, panel/s6e63m0.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/fdfbfd7a-b91d-3f59-11c8-984704ce0ee1@linux.intel.com
parents 73dc923e cf9a4be4
...@@ -319,6 +319,15 @@ CRTC Functions Reference ...@@ -319,6 +319,15 @@ CRTC Functions Reference
.. kernel-doc:: drivers/gpu/drm/drm_crtc.c .. kernel-doc:: drivers/gpu/drm/drm_crtc.c
:export: :export:
Color Management Functions Reference
------------------------------------
.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
:export:
.. kernel-doc:: include/drm/drm_color_mgmt.h
:internal:
Frame Buffer Abstraction Frame Buffer Abstraction
======================== ========================
...@@ -370,6 +379,21 @@ Plane Functions Reference ...@@ -370,6 +379,21 @@ Plane Functions Reference
.. kernel-doc:: drivers/gpu/drm/drm_plane.c .. kernel-doc:: drivers/gpu/drm/drm_plane.c
:export: :export:
Plane Composition Functions Reference
-------------------------------------
.. kernel-doc:: drivers/gpu/drm/drm_blend.c
:export:
Plane Damage Tracking Functions Reference
-----------------------------------------
.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c
:export:
.. kernel-doc:: include/drm/drm_damage_helper.h
:internal:
Display Modes Function Reference Display Modes Function Reference
================================ ================================
...@@ -436,6 +460,9 @@ KMS Locking ...@@ -436,6 +460,9 @@ KMS Locking
KMS Properties KMS Properties
============== ==============
This section of the documentation is primarily aimed at user-space developers.
For the driver APIs, see the other sections.
Property Types and Blob Property Support Property Types and Blob Property Support
---------------------------------------- ----------------------------------------
...@@ -466,39 +493,30 @@ Standard CRTC Properties ...@@ -466,39 +493,30 @@ Standard CRTC Properties
.. kernel-doc:: drivers/gpu/drm/drm_crtc.c .. kernel-doc:: drivers/gpu/drm/drm_crtc.c
:doc: standard CRTC properties :doc: standard CRTC properties
Standard Plane Properties
-------------------------
.. kernel-doc:: drivers/gpu/drm/drm_plane.c
:doc: standard plane properties
Plane Composition Properties Plane Composition Properties
---------------------------- ----------------------------
.. kernel-doc:: drivers/gpu/drm/drm_blend.c .. kernel-doc:: drivers/gpu/drm/drm_blend.c
:doc: overview :doc: overview
.. kernel-doc:: drivers/gpu/drm/drm_blend.c Damage Tracking Properties
:export: --------------------------
FB_DAMAGE_CLIPS
~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c .. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c
:doc: overview :doc: overview
.. kernel-doc:: drivers/gpu/drm/drm_damage_helper.c
:export:
.. kernel-doc:: include/drm/drm_damage_helper.h
:internal:
Color Management Properties Color Management Properties
--------------------------- ---------------------------
.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c .. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
:doc: overview :doc: overview
.. kernel-doc:: drivers/gpu/drm/drm_color_mgmt.c
:export:
.. kernel-doc:: include/drm/drm_color_mgmt.h
:internal:
Tile Group Property Tile Group Property
------------------- -------------------
......
...@@ -457,5 +457,8 @@ Userspace API Structures ...@@ -457,5 +457,8 @@ Userspace API Structures
.. kernel-doc:: include/uapi/drm/drm_mode.h .. kernel-doc:: include/uapi/drm/drm_mode.h
:doc: overview :doc: overview
.. kernel-doc:: include/uapi/drm/drm.h
:internal:
.. kernel-doc:: include/uapi/drm/drm_mode.h .. kernel-doc:: include/uapi/drm/drm_mode.h
:internal: :internal:
...@@ -5985,8 +5985,8 @@ F: Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml ...@@ -5985,8 +5985,8 @@ F: Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
F: drivers/gpu/drm/stm F: drivers/gpu/drm/stm
DRM DRIVERS FOR TI KEYSTONE DRM DRIVERS FOR TI KEYSTONE
M: Jyri Sarha <jsarha@ti.com> M: Jyri Sarha <jyri.sarha@iki.fi>
M: Tomi Valkeinen <tomi.valkeinen@ti.com> M: Tomi Valkeinen <tomba@kernel.org>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Maintained S: Maintained
T: git git://anongit.freedesktop.org/drm/drm-misc T: git git://anongit.freedesktop.org/drm/drm-misc
...@@ -5996,15 +5996,15 @@ F: Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml ...@@ -5996,15 +5996,15 @@ F: Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
F: drivers/gpu/drm/tidss/ F: drivers/gpu/drm/tidss/
DRM DRIVERS FOR TI LCDC DRM DRIVERS FOR TI LCDC
M: Jyri Sarha <jsarha@ti.com> M: Jyri Sarha <jyri.sarha@iki.fi>
R: Tomi Valkeinen <tomi.valkeinen@ti.com> R: Tomi Valkeinen <tomba@kernel.org>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/display/tilcdc/ F: Documentation/devicetree/bindings/display/tilcdc/
F: drivers/gpu/drm/tilcdc/ F: drivers/gpu/drm/tilcdc/
DRM DRIVERS FOR TI OMAP DRM DRIVERS FOR TI OMAP
M: Tomi Valkeinen <tomi.valkeinen@ti.com> M: Tomi Valkeinen <tomba@kernel.org>
L: dri-devel@lists.freedesktop.org L: dri-devel@lists.freedesktop.org
S: Maintained S: Maintained
F: Documentation/devicetree/bindings/display/ti/ F: Documentation/devicetree/bindings/display/ti/
......
...@@ -185,12 +185,6 @@ ...@@ -185,12 +185,6 @@
* plane does not expose the "alpha" property, then this is * plane does not expose the "alpha" property, then this is
* assumed to be 1.0 * assumed to be 1.0
* *
* IN_FORMATS:
* Blob property which contains the set of buffer format and modifier
* pairs supported by this plane. The blob is a drm_format_modifier_blob
* struct. Without this property the plane doesn't support buffers with
* modifiers. Userspace cannot change this property.
*
* Note that all the property extensions described here apply either to the * Note that all the property extensions described here apply either to the
* plane or the CRTC (e.g. for the background color, which currently is not * plane or the CRTC (e.g. for the background color, which currently is not
* exposed and assumed to be black). * exposed and assumed to be black).
......
...@@ -2496,6 +2496,11 @@ void drm_fbdev_generic_setup(struct drm_device *dev, ...@@ -2496,6 +2496,11 @@ void drm_fbdev_generic_setup(struct drm_device *dev,
return; return;
} }
/*
* FIXME: This mixes up depth with bpp, which results in a glorious
* mess, resulting in some drivers picking wrong fbdev defaults and
* others wrong preferred_depth defaults.
*/
if (!preferred_bpp) if (!preferred_bpp)
preferred_bpp = dev->mode_config.preferred_depth; preferred_bpp = dev->mode_config.preferred_depth;
if (!preferred_bpp) if (!preferred_bpp)
......
...@@ -626,6 +626,9 @@ void drm_mode_config_validate(struct drm_device *dev) ...@@ -626,6 +626,9 @@ void drm_mode_config_validate(struct drm_device *dev)
{ {
struct drm_encoder *encoder; struct drm_encoder *encoder;
struct drm_crtc *crtc; struct drm_crtc *crtc;
struct drm_plane *plane;
u32 primary_with_crtc = 0, cursor_with_crtc = 0;
unsigned int num_primary = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) if (!drm_core_check_feature(dev, DRIVER_MODESET))
return; return;
...@@ -642,17 +645,44 @@ void drm_mode_config_validate(struct drm_device *dev) ...@@ -642,17 +645,44 @@ void drm_mode_config_validate(struct drm_device *dev)
WARN(!crtc->primary, "Missing primary plane on [CRTC:%d:%s]\n", WARN(!crtc->primary, "Missing primary plane on [CRTC:%d:%s]\n",
crtc->base.id, crtc->name); crtc->base.id, crtc->name);
WARN(crtc->cursor && crtc->funcs->cursor_set,
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_set func",
crtc->base.id, crtc->name);
WARN(crtc->cursor && crtc->funcs->cursor_set2,
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_set2 func",
crtc->base.id, crtc->name);
WARN(crtc->cursor && crtc->funcs->cursor_move,
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_move func",
crtc->base.id, crtc->name);
if (crtc->primary) { if (crtc->primary) {
WARN(!(crtc->primary->possible_crtcs & drm_crtc_mask(crtc)), WARN(!(crtc->primary->possible_crtcs & drm_crtc_mask(crtc)),
"Bogus primary plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n", "Bogus primary plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n",
crtc->primary->base.id, crtc->primary->name, crtc->primary->base.id, crtc->primary->name,
crtc->base.id, crtc->name); crtc->base.id, crtc->name);
WARN(primary_with_crtc & drm_plane_mask(crtc->primary),
"Primary plane [PLANE:%d:%s] used for multiple CRTCs",
crtc->primary->base.id, crtc->primary->name);
primary_with_crtc |= drm_plane_mask(crtc->primary);
} }
if (crtc->cursor) { if (crtc->cursor) {
WARN(!(crtc->cursor->possible_crtcs & drm_crtc_mask(crtc)), WARN(!(crtc->cursor->possible_crtcs & drm_crtc_mask(crtc)),
"Bogus cursor plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n", "Bogus cursor plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n",
crtc->cursor->base.id, crtc->cursor->name, crtc->cursor->base.id, crtc->cursor->name,
crtc->base.id, crtc->name); crtc->base.id, crtc->name);
WARN(cursor_with_crtc & drm_plane_mask(crtc->cursor),
"Cursor plane [PLANE:%d:%s] used for multiple CRTCs",
crtc->cursor->base.id, crtc->cursor->name);
cursor_with_crtc |= drm_plane_mask(crtc->cursor);
}
} }
drm_for_each_plane(plane, dev) {
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
num_primary++;
} }
WARN(num_primary != dev->mode_config.num_crtc,
"Must have as many primary planes as there are CRTCs, but have %u primary planes and %u CRTCs",
num_primary, dev->mode_config.num_crtc);
} }
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
* enum drm_plane_type). A plane can be compatible with multiple CRTCs, see * enum drm_plane_type). A plane can be compatible with multiple CRTCs, see
* &drm_plane.possible_crtcs. * &drm_plane.possible_crtcs.
* *
* Each CRTC must have a unique primary plane userspace can attach to enable
* the CRTC. In other words, userspace must be able to attach a different
* primary plane to each CRTC at the same time. Primary planes can still be
* compatible with multiple CRTCs. There must be exactly as many primary planes
* as there are CRTCs.
*
* Legacy uAPI doesn't expose the primary and cursor planes directly. DRM core * Legacy uAPI doesn't expose the primary and cursor planes directly. DRM core
* relies on the driver to set the primary and optionally the cursor plane used * relies on the driver to set the primary and optionally the cursor plane used
* for legacy IOCTLs. This is done by calling drm_crtc_init_with_planes(). All * for legacy IOCTLs. This is done by calling drm_crtc_init_with_planes(). All
...@@ -62,6 +68,18 @@ ...@@ -62,6 +68,18 @@
* userspace too much. * userspace too much.
*/ */
/**
* DOC: standard plane properties
*
* DRM planes have a few standardized properties:
*
* IN_FORMATS:
* Blob property which contains the set of buffer format and modifier
* pairs supported by this plane. The blob is a struct
* drm_format_modifier_blob. Without this property the plane doesn't
* support buffers with modifiers. Userspace cannot change this property.
*/
static unsigned int drm_num_planes(struct drm_device *dev) static unsigned int drm_num_planes(struct drm_device *dev)
{ {
unsigned int num = 0; unsigned int num = 0;
......
...@@ -329,16 +329,16 @@ static int hibmc_pci_probe(struct pci_dev *pdev, ...@@ -329,16 +329,16 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
dev->pdev = pdev; dev->pdev = pdev;
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
ret = pci_enable_device(pdev); ret = pcim_enable_device(pdev);
if (ret) { if (ret) {
drm_err(dev, "failed to enable pci device: %d\n", ret); drm_err(dev, "failed to enable pci device: %d\n", ret);
goto err_free; goto err_return;
} }
ret = hibmc_load(dev); ret = hibmc_load(dev);
if (ret) { if (ret) {
drm_err(dev, "failed to load hibmc: %d\n", ret); drm_err(dev, "failed to load hibmc: %d\n", ret);
goto err_disable; goto err_return;
} }
ret = drm_dev_register(dev, 0); ret = drm_dev_register(dev, 0);
...@@ -354,11 +354,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev, ...@@ -354,11 +354,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
err_unload: err_unload:
hibmc_unload(dev); hibmc_unload(dev);
err_disable: err_return:
pci_disable_device(pdev);
err_free:
drm_dev_put(dev);
return ret; return ret;
} }
......
...@@ -692,12 +692,12 @@ static const struct backlight_ops s6e63m0_backlight_ops = { ...@@ -692,12 +692,12 @@ static const struct backlight_ops s6e63m0_backlight_ops = {
.update_status = s6e63m0_set_brightness, .update_status = s6e63m0_set_brightness,
}; };
static int s6e63m0_backlight_register(struct s6e63m0 *ctx) static int s6e63m0_backlight_register(struct s6e63m0 *ctx, u32 max_brightness)
{ {
struct backlight_properties props = { struct backlight_properties props = {
.type = BACKLIGHT_RAW, .type = BACKLIGHT_RAW,
.brightness = MAX_BRIGHTNESS, .brightness = max_brightness,
.max_brightness = MAX_BRIGHTNESS .max_brightness = max_brightness,
}; };
struct device *dev = ctx->dev; struct device *dev = ctx->dev;
int ret = 0; int ret = 0;
...@@ -719,6 +719,7 @@ int s6e63m0_probe(struct device *dev, ...@@ -719,6 +719,7 @@ int s6e63m0_probe(struct device *dev,
bool dsi_mode) bool dsi_mode)
{ {
struct s6e63m0 *ctx; struct s6e63m0 *ctx;
u32 max_brightness;
int ret; int ret;
ctx = devm_kzalloc(dev, sizeof(struct s6e63m0), GFP_KERNEL); ctx = devm_kzalloc(dev, sizeof(struct s6e63m0), GFP_KERNEL);
...@@ -734,6 +735,14 @@ int s6e63m0_probe(struct device *dev, ...@@ -734,6 +735,14 @@ int s6e63m0_probe(struct device *dev,
ctx->enabled = false; ctx->enabled = false;
ctx->prepared = false; ctx->prepared = false;
ret = device_property_read_u32(dev, "max-brightness", &max_brightness);
if (ret)
max_brightness = MAX_BRIGHTNESS;
if (max_brightness > MAX_BRIGHTNESS) {
dev_err(dev, "illegal max brightness specified\n");
max_brightness = MAX_BRIGHTNESS;
}
ctx->supplies[0].supply = "vdd3"; ctx->supplies[0].supply = "vdd3";
ctx->supplies[1].supply = "vci"; ctx->supplies[1].supply = "vci";
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
...@@ -753,7 +762,7 @@ int s6e63m0_probe(struct device *dev, ...@@ -753,7 +762,7 @@ int s6e63m0_probe(struct device *dev,
dsi_mode ? DRM_MODE_CONNECTOR_DSI : dsi_mode ? DRM_MODE_CONNECTOR_DSI :
DRM_MODE_CONNECTOR_DPI); DRM_MODE_CONNECTOR_DPI);
ret = s6e63m0_backlight_register(ctx); ret = s6e63m0_backlight_register(ctx, max_brightness);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
...@@ -271,7 +271,7 @@ struct qxl_mode { ...@@ -271,7 +271,7 @@ struct qxl_mode {
/* qxl-1 compat: fixed */ /* qxl-1 compat: fixed */
struct qxl_modes { struct qxl_modes {
uint32_t n_modes; uint32_t n_modes;
struct qxl_mode modes[0]; struct qxl_mode modes[];
}; };
/* qxl-1 compat: append only */ /* qxl-1 compat: append only */
...@@ -382,12 +382,12 @@ struct qxl_data_chunk { ...@@ -382,12 +382,12 @@ struct qxl_data_chunk {
uint32_t data_size; uint32_t data_size;
QXLPHYSICAL prev_chunk; QXLPHYSICAL prev_chunk;
QXLPHYSICAL next_chunk; QXLPHYSICAL next_chunk;
uint8_t data[0]; uint8_t data[];
}; };
struct qxl_message { struct qxl_message {
union qxl_release_info release_info; union qxl_release_info release_info;
uint8_t data[0]; uint8_t data[];
}; };
struct qxl_compat_update_cmd { struct qxl_compat_update_cmd {
...@@ -469,7 +469,7 @@ struct qxl_raster_glyph { ...@@ -469,7 +469,7 @@ struct qxl_raster_glyph {
struct qxl_point glyph_origin; struct qxl_point glyph_origin;
uint16_t width; uint16_t width;
uint16_t height; uint16_t height;
uint8_t data[0]; uint8_t data[];
}; };
struct qxl_string { struct qxl_string {
...@@ -768,7 +768,7 @@ enum { ...@@ -768,7 +768,7 @@ enum {
struct qxl_path_seg { struct qxl_path_seg {
uint32_t flags; uint32_t flags;
uint32_t count; uint32_t count;
struct qxl_point_fix points[0]; struct qxl_point_fix points[];
}; };
struct qxl_path { struct qxl_path {
...@@ -819,7 +819,7 @@ struct qxl_image_descriptor { ...@@ -819,7 +819,7 @@ struct qxl_image_descriptor {
struct qxl_palette { struct qxl_palette {
uint64_t unique; uint64_t unique;
uint16_t num_ents; uint16_t num_ents;
uint32_t ents[0]; uint32_t ents[];
}; };
struct qxl_bitmap { struct qxl_bitmap {
...@@ -838,7 +838,7 @@ struct qxl_surface_id { ...@@ -838,7 +838,7 @@ struct qxl_surface_id {
struct qxl_encoder_data { struct qxl_encoder_data {
uint32_t data_size; uint32_t data_size;
uint8_t data[0]; uint8_t data[];
}; };
struct qxl_image { struct qxl_image {
...@@ -868,7 +868,7 @@ struct qxl_monitors_config { ...@@ -868,7 +868,7 @@ struct qxl_monitors_config {
uint16_t count; uint16_t count;
uint16_t max_allowed; /* If it is 0 no fixed limit is given by the uint16_t max_allowed; /* If it is 0 no fixed limit is given by the
driver */ driver */
struct qxl_head heads[0]; struct qxl_head heads[];
}; };
#pragma pack(pop) #pragma pack(pop)
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
*/ */
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/version.h>
#include <linux/dma-buf.h> #include <linux/dma-buf.h>
#include <linux/of_graph.h> #include <linux/of_graph.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/shmem_fs.h> #include <linux/shmem_fs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h> #include <drm/drm_bridge.h>
......
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config DRM_VIRTIO_GPU config DRM_VIRTIO_GPU
tristate "Virtio GPU driver" tristate "Virtio GPU driver"
depends on DRM && VIRTIO && VIRTIO_MENU && MMU depends on DRM && VIRTIO_MENU && MMU
select VIRTIO
select DRM_KMS_HELPER select DRM_KMS_HELPER
select DRM_GEM_SHMEM_HELPER select DRM_GEM_SHMEM_HELPER
select VIRTIO_DMA_SHARED_BUFFER select VIRTIO_DMA_SHARED_BUFFER
......
...@@ -134,6 +134,8 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev, ...@@ -134,6 +134,8 @@ int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev,
obj = &vram->base.base.base; obj = &vram->base.base.base;
obj->funcs = &virtio_gpu_vram_funcs; obj->funcs = &virtio_gpu_vram_funcs;
params->size = PAGE_ALIGN(params->size);
drm_gem_private_object_init(vgdev->ddev, obj, params->size); drm_gem_private_object_init(vgdev->ddev, obj, params->size);
/* Create fake offset */ /* Create fake offset */
......
/** /*
* \file drm.h
* Header for the Direct Rendering Manager * Header for the Direct Rendering Manager
* *
* \author Rickard E. (Rik) Faith <faith@valinux.com> * Author: Rickard E. (Rik) Faith <faith@valinux.com>
* *
* \par Acknowledgments: * Acknowledgments:
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic \c cmpxchg. * Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
*/ */
/* /*
...@@ -85,7 +84,7 @@ typedef unsigned int drm_context_t; ...@@ -85,7 +84,7 @@ typedef unsigned int drm_context_t;
typedef unsigned int drm_drawable_t; typedef unsigned int drm_drawable_t;
typedef unsigned int drm_magic_t; typedef unsigned int drm_magic_t;
/** /*
* Cliprect. * Cliprect.
* *
* \warning: If you change this structure, make sure you change * \warning: If you change this structure, make sure you change
...@@ -101,7 +100,7 @@ struct drm_clip_rect { ...@@ -101,7 +100,7 @@ struct drm_clip_rect {
unsigned short y2; unsigned short y2;
}; };
/** /*
* Drawable information. * Drawable information.
*/ */
struct drm_drawable_info { struct drm_drawable_info {
...@@ -109,7 +108,7 @@ struct drm_drawable_info { ...@@ -109,7 +108,7 @@ struct drm_drawable_info {
struct drm_clip_rect *rects; struct drm_clip_rect *rects;
}; };
/** /*
* Texture region, * Texture region,
*/ */
struct drm_tex_region { struct drm_tex_region {
...@@ -120,7 +119,7 @@ struct drm_tex_region { ...@@ -120,7 +119,7 @@ struct drm_tex_region {
unsigned int age; unsigned int age;
}; };
/** /*
* Hardware lock. * Hardware lock.
* *
* The lock structure is a simple cache-line aligned integer. To avoid * The lock structure is a simple cache-line aligned integer. To avoid
...@@ -132,7 +131,7 @@ struct drm_hw_lock { ...@@ -132,7 +131,7 @@ struct drm_hw_lock {
char padding[60]; /**< Pad to cache line */ char padding[60]; /**< Pad to cache line */
}; };
/** /*
* DRM_IOCTL_VERSION ioctl argument type. * DRM_IOCTL_VERSION ioctl argument type.
* *
* \sa drmGetVersion(). * \sa drmGetVersion().
...@@ -149,7 +148,7 @@ struct drm_version { ...@@ -149,7 +148,7 @@ struct drm_version {
char __user *desc; /**< User-space buffer to hold desc */ char __user *desc; /**< User-space buffer to hold desc */
}; };
/** /*
* DRM_IOCTL_GET_UNIQUE ioctl argument type. * DRM_IOCTL_GET_UNIQUE ioctl argument type.
* *
* \sa drmGetBusid() and drmSetBusId(). * \sa drmGetBusid() and drmSetBusId().
...@@ -168,7 +167,7 @@ struct drm_block { ...@@ -168,7 +167,7 @@ struct drm_block {
int unused; int unused;
}; };
/** /*
* DRM_IOCTL_CONTROL ioctl argument type. * DRM_IOCTL_CONTROL ioctl argument type.
* *
* \sa drmCtlInstHandler() and drmCtlUninstHandler(). * \sa drmCtlInstHandler() and drmCtlUninstHandler().
...@@ -183,7 +182,7 @@ struct drm_control { ...@@ -183,7 +182,7 @@ struct drm_control {
int irq; int irq;
}; };
/** /*
* Type of memory to map. * Type of memory to map.
*/ */
enum drm_map_type { enum drm_map_type {
...@@ -195,7 +194,7 @@ enum drm_map_type { ...@@ -195,7 +194,7 @@ enum drm_map_type {
_DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */
}; };
/** /*
* Memory mapping flags. * Memory mapping flags.
*/ */
enum drm_map_flags { enum drm_map_flags {
...@@ -214,7 +213,7 @@ struct drm_ctx_priv_map { ...@@ -214,7 +213,7 @@ struct drm_ctx_priv_map {
void *handle; /**< Handle of map */ void *handle; /**< Handle of map */
}; };
/** /*
* DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls
* argument type. * argument type.
* *
...@@ -231,7 +230,7 @@ struct drm_map { ...@@ -231,7 +230,7 @@ struct drm_map {
/* Private data */ /* Private data */
}; };
/** /*
* DRM_IOCTL_GET_CLIENT ioctl argument type. * DRM_IOCTL_GET_CLIENT ioctl argument type.
*/ */
struct drm_client { struct drm_client {
...@@ -263,7 +262,7 @@ enum drm_stat_type { ...@@ -263,7 +262,7 @@ enum drm_stat_type {
/* Add to the *END* of the list */ /* Add to the *END* of the list */
}; };
/** /*
* DRM_IOCTL_GET_STATS ioctl argument type. * DRM_IOCTL_GET_STATS ioctl argument type.
*/ */
struct drm_stats { struct drm_stats {
...@@ -274,7 +273,7 @@ struct drm_stats { ...@@ -274,7 +273,7 @@ struct drm_stats {
} data[15]; } data[15];
}; };
/** /*
* Hardware locking flags. * Hardware locking flags.
*/ */
enum drm_lock_flags { enum drm_lock_flags {
...@@ -289,7 +288,7 @@ enum drm_lock_flags { ...@@ -289,7 +288,7 @@ enum drm_lock_flags {
_DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */
}; };
/** /*
* DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type.
* *
* \sa drmGetLock() and drmUnlock(). * \sa drmGetLock() and drmUnlock().
...@@ -299,7 +298,7 @@ struct drm_lock { ...@@ -299,7 +298,7 @@ struct drm_lock {
enum drm_lock_flags flags; enum drm_lock_flags flags;
}; };
/** /*
* DMA flags * DMA flags
* *
* \warning * \warning
...@@ -328,7 +327,7 @@ enum drm_dma_flags { ...@@ -328,7 +327,7 @@ enum drm_dma_flags {
_DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */
}; };
/** /*
* DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type.
* *
* \sa drmAddBufs(). * \sa drmAddBufs().
...@@ -351,7 +350,7 @@ struct drm_buf_desc { ...@@ -351,7 +350,7 @@ struct drm_buf_desc {
*/ */
}; };
/** /*
* DRM_IOCTL_INFO_BUFS ioctl argument type. * DRM_IOCTL_INFO_BUFS ioctl argument type.
*/ */
struct drm_buf_info { struct drm_buf_info {
...@@ -359,7 +358,7 @@ struct drm_buf_info { ...@@ -359,7 +358,7 @@ struct drm_buf_info {
struct drm_buf_desc __user *list; struct drm_buf_desc __user *list;
}; };
/** /*
* DRM_IOCTL_FREE_BUFS ioctl argument type. * DRM_IOCTL_FREE_BUFS ioctl argument type.
*/ */
struct drm_buf_free { struct drm_buf_free {
...@@ -367,7 +366,7 @@ struct drm_buf_free { ...@@ -367,7 +366,7 @@ struct drm_buf_free {
int __user *list; int __user *list;
}; };
/** /*
* Buffer information * Buffer information
* *
* \sa drm_buf_map. * \sa drm_buf_map.
...@@ -379,7 +378,7 @@ struct drm_buf_pub { ...@@ -379,7 +378,7 @@ struct drm_buf_pub {
void __user *address; /**< Address of buffer */ void __user *address; /**< Address of buffer */
}; };
/** /*
* DRM_IOCTL_MAP_BUFS ioctl argument type. * DRM_IOCTL_MAP_BUFS ioctl argument type.
*/ */
struct drm_buf_map { struct drm_buf_map {
...@@ -392,7 +391,7 @@ struct drm_buf_map { ...@@ -392,7 +391,7 @@ struct drm_buf_map {
struct drm_buf_pub __user *list; /**< Buffer information */ struct drm_buf_pub __user *list; /**< Buffer information */
}; };
/** /*
* DRM_IOCTL_DMA ioctl argument type. * DRM_IOCTL_DMA ioctl argument type.
* *
* Indices here refer to the offset into the buffer list in drm_buf_get. * Indices here refer to the offset into the buffer list in drm_buf_get.
...@@ -417,7 +416,7 @@ enum drm_ctx_flags { ...@@ -417,7 +416,7 @@ enum drm_ctx_flags {
_DRM_CONTEXT_2DONLY = 0x02 _DRM_CONTEXT_2DONLY = 0x02
}; };
/** /*
* DRM_IOCTL_ADD_CTX ioctl argument type. * DRM_IOCTL_ADD_CTX ioctl argument type.
* *
* \sa drmCreateContext() and drmDestroyContext(). * \sa drmCreateContext() and drmDestroyContext().
...@@ -427,7 +426,7 @@ struct drm_ctx { ...@@ -427,7 +426,7 @@ struct drm_ctx {
enum drm_ctx_flags flags; enum drm_ctx_flags flags;
}; };
/** /*
* DRM_IOCTL_RES_CTX ioctl argument type. * DRM_IOCTL_RES_CTX ioctl argument type.
*/ */
struct drm_ctx_res { struct drm_ctx_res {
...@@ -435,14 +434,14 @@ struct drm_ctx_res { ...@@ -435,14 +434,14 @@ struct drm_ctx_res {
struct drm_ctx __user *contexts; struct drm_ctx __user *contexts;
}; };
/** /*
* DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type.
*/ */
struct drm_draw { struct drm_draw {
drm_drawable_t handle; drm_drawable_t handle;
}; };
/** /*
* DRM_IOCTL_UPDATE_DRAW ioctl argument type. * DRM_IOCTL_UPDATE_DRAW ioctl argument type.
*/ */
typedef enum { typedef enum {
...@@ -456,14 +455,14 @@ struct drm_update_draw { ...@@ -456,14 +455,14 @@ struct drm_update_draw {
unsigned long long data; unsigned long long data;
}; };
/** /*
* DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type.
*/ */
struct drm_auth { struct drm_auth {
drm_magic_t magic; drm_magic_t magic;
}; };
/** /*
* DRM_IOCTL_IRQ_BUSID ioctl argument type. * DRM_IOCTL_IRQ_BUSID ioctl argument type.
* *
* \sa drmGetInterruptFromBusID(). * \sa drmGetInterruptFromBusID().
...@@ -505,7 +504,7 @@ struct drm_wait_vblank_reply { ...@@ -505,7 +504,7 @@ struct drm_wait_vblank_reply {
long tval_usec; long tval_usec;
}; };
/** /*
* DRM_IOCTL_WAIT_VBLANK ioctl argument type. * DRM_IOCTL_WAIT_VBLANK ioctl argument type.
* *
* \sa drmWaitVBlank(). * \sa drmWaitVBlank().
...@@ -518,7 +517,7 @@ union drm_wait_vblank { ...@@ -518,7 +517,7 @@ union drm_wait_vblank {
#define _DRM_PRE_MODESET 1 #define _DRM_PRE_MODESET 1
#define _DRM_POST_MODESET 2 #define _DRM_POST_MODESET 2
/** /*
* DRM_IOCTL_MODESET_CTL ioctl argument type * DRM_IOCTL_MODESET_CTL ioctl argument type
* *
* \sa drmModesetCtl(). * \sa drmModesetCtl().
...@@ -528,7 +527,7 @@ struct drm_modeset_ctl { ...@@ -528,7 +527,7 @@ struct drm_modeset_ctl {
__u32 cmd; __u32 cmd;
}; };
/** /*
* DRM_IOCTL_AGP_ENABLE ioctl argument type. * DRM_IOCTL_AGP_ENABLE ioctl argument type.
* *
* \sa drmAgpEnable(). * \sa drmAgpEnable().
...@@ -537,7 +536,7 @@ struct drm_agp_mode { ...@@ -537,7 +536,7 @@ struct drm_agp_mode {
unsigned long mode; /**< AGP mode */ unsigned long mode; /**< AGP mode */
}; };
/** /*
* DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type.
* *
* \sa drmAgpAlloc() and drmAgpFree(). * \sa drmAgpAlloc() and drmAgpFree().
...@@ -549,7 +548,7 @@ struct drm_agp_buffer { ...@@ -549,7 +548,7 @@ struct drm_agp_buffer {
unsigned long physical; /**< Physical used by i810 */ unsigned long physical; /**< Physical used by i810 */
}; };
/** /*
* DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type.
* *
* \sa drmAgpBind() and drmAgpUnbind(). * \sa drmAgpBind() and drmAgpUnbind().
...@@ -559,7 +558,7 @@ struct drm_agp_binding { ...@@ -559,7 +558,7 @@ struct drm_agp_binding {
unsigned long offset; /**< In bytes -- will round to page boundary */ unsigned long offset; /**< In bytes -- will round to page boundary */
}; };
/** /*
* DRM_IOCTL_AGP_INFO ioctl argument type. * DRM_IOCTL_AGP_INFO ioctl argument type.
* *
* \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(), * \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(),
...@@ -580,7 +579,7 @@ struct drm_agp_info { ...@@ -580,7 +579,7 @@ struct drm_agp_info {
unsigned short id_device; unsigned short id_device;
}; };
/** /*
* DRM_IOCTL_SG_ALLOC ioctl argument type. * DRM_IOCTL_SG_ALLOC ioctl argument type.
*/ */
struct drm_scatter_gather { struct drm_scatter_gather {
...@@ -588,7 +587,7 @@ struct drm_scatter_gather { ...@@ -588,7 +587,7 @@ struct drm_scatter_gather {
unsigned long handle; /**< Used for mapping / unmapping */ unsigned long handle; /**< Used for mapping / unmapping */
}; };
/** /*
* DRM_IOCTL_SET_VERSION ioctl argument type. * DRM_IOCTL_SET_VERSION ioctl argument type.
*/ */
struct drm_set_version { struct drm_set_version {
...@@ -598,14 +597,14 @@ struct drm_set_version { ...@@ -598,14 +597,14 @@ struct drm_set_version {
int drm_dd_minor; int drm_dd_minor;
}; };
/** DRM_IOCTL_GEM_CLOSE ioctl argument type */ /* DRM_IOCTL_GEM_CLOSE ioctl argument type */
struct drm_gem_close { struct drm_gem_close {
/** Handle of the object to be closed. */ /** Handle of the object to be closed. */
__u32 handle; __u32 handle;
__u32 pad; __u32 pad;
}; };
/** DRM_IOCTL_GEM_FLINK ioctl argument type */ /* DRM_IOCTL_GEM_FLINK ioctl argument type */
struct drm_gem_flink { struct drm_gem_flink {
/** Handle for the object being named */ /** Handle for the object being named */
__u32 handle; __u32 handle;
...@@ -614,7 +613,7 @@ struct drm_gem_flink { ...@@ -614,7 +613,7 @@ struct drm_gem_flink {
__u32 name; __u32 name;
}; };
/** DRM_IOCTL_GEM_OPEN ioctl argument type */ /* DRM_IOCTL_GEM_OPEN ioctl argument type */
struct drm_gem_open { struct drm_gem_open {
/** Name of object being opened */ /** Name of object being opened */
__u32 name; __u32 name;
...@@ -652,7 +651,7 @@ struct drm_gem_open { ...@@ -652,7 +651,7 @@ struct drm_gem_open {
#define DRM_CAP_SYNCOBJ 0x13 #define DRM_CAP_SYNCOBJ 0x13
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 #define DRM_CAP_SYNCOBJ_TIMELINE 0x14
/** DRM_IOCTL_GET_CAP ioctl argument type */ /* DRM_IOCTL_GET_CAP ioctl argument type */
struct drm_get_cap { struct drm_get_cap {
__u64 capability; __u64 capability;
__u64 value; __u64 value;
...@@ -678,7 +677,9 @@ struct drm_get_cap { ...@@ -678,7 +677,9 @@ struct drm_get_cap {
/** /**
* DRM_CLIENT_CAP_ATOMIC * DRM_CLIENT_CAP_ATOMIC
* *
* If set to 1, the DRM core will expose atomic properties to userspace * If set to 1, the DRM core will expose atomic properties to userspace. This
* implicitly enables &DRM_CLIENT_CAP_UNIVERSAL_PLANES and
* &DRM_CLIENT_CAP_ASPECT_RATIO.
*/ */
#define DRM_CLIENT_CAP_ATOMIC 3 #define DRM_CLIENT_CAP_ATOMIC 3
...@@ -698,7 +699,7 @@ struct drm_get_cap { ...@@ -698,7 +699,7 @@ struct drm_get_cap {
*/ */
#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 #define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ /* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
struct drm_set_client_cap { struct drm_set_client_cap {
__u64 capability; __u64 capability;
__u64 value; __u64 value;
...@@ -950,7 +951,7 @@ extern "C" { ...@@ -950,7 +951,7 @@ extern "C" {
#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) #define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
/** /*
* Device specific ioctls should only be in their respective headers * Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x9f. * The device specific ioctl range is from 0x40 to 0x9f.
* Generic IOCTLS restart at 0xA0. * Generic IOCTLS restart at 0xA0.
...@@ -961,7 +962,7 @@ extern "C" { ...@@ -961,7 +962,7 @@ extern "C" {
#define DRM_COMMAND_BASE 0x40 #define DRM_COMMAND_BASE 0x40
#define DRM_COMMAND_END 0xA0 #define DRM_COMMAND_END 0xA0
/** /*
* Header for events written back to userspace on the drm fd. The * Header for events written back to userspace on the drm fd. The
* type defines the type of event, the length specifies the total * type defines the type of event, the length specifies the total
* length of the event (including the header), and user_data is * length of the event (including the header), and user_data is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment