~emersion/drmdb

fca493e0891500577fe6bfa91d10d27840599a81 — Simon Ser 9 days ago a85c27a
drmdoc: update docs
M drmdoc/color-management-properties.go => drmdoc/color-management-properties.go +2 -0
@@ 3,6 3,8 @@
package drmdoc

var colorManagementProperties = map[string]string{
	"COLOR_ENCODING":   "Optional plane enum property to support different non RGB\ncolor encodings. The driver can provide a subset of standard\nenum values supported by the DRM plane.",
	"COLOR_RANGE":      "Optional plane enum property to support different non RGB\ncolor parameter ranges. The driver can provide a subset of\nstandard enum values supported by the DRM plane.",
	"CTM":              "Blob property to set the current transformation matrix (CTM) apply to\npixel data after the lookup through the degamma LUT and before the\nlookup through the gamma LUT. The data is interpreted as a struct\n&drm_color_ctm.\n\nSetting this to NULL (blob property value set to 0) means a\nunit/pass-thru matrix should be used. This is generally the driver\nboot-up state too. Drivers can access the blob for the color conversion\nmatrix through &drm_crtc_state.ctm.",
	"DEGAMMA_LUT":      "Blob property to set the degamma lookup table (LUT) mapping pixel data\nfrom the framebuffer before it is given to the transformation matrix.\nThe data is interpreted as an array of &struct drm_color_lut elements.\nHardware might choose not to use the full precision of the LUT elements\nnor use all the elements of the LUT (for example the hardware might\nchoose to interpolate between LUT[0] and LUT[4]).\n\nSetting this to NULL (blob property value set to 0) means a\nlinear/pass-thru gamma table should be used. This is generally the\ndriver boot-up state too. Drivers can access this blob through\n&drm_crtc_state.degamma_lut.",
	"DEGAMMA_LUT_SIZE": "Unsinged range property to give the size of the lookup table to be set\non the DEGAMMA_LUT property (the size depends on the underlying\nhardware). If drivers support multiple LUT sizes then they should\npublish the largest size, and sub-sample smaller sized LUTs (e.g. for\nsplit-gamma modes) appropriately.",

M drmdoc/drmdoc.go => drmdoc/drmdoc.go +7 -4
@@ 3,6 3,7 @@ package drmdoc
//go:generate go run generate.go drivers/gpu/drm/drm_connector.c "standard connector properties"
//go:generate go run generate.go drivers/gpu/drm/drm_connector.c "HDMI connector properties"
//go:generate go run generate.go drivers/gpu/drm/drm_crtc.c "standard CRTC properties"
//go:generate go run generate.go drivers/gpu/drm/drm_plane.c "standard plane properties"
//go:generate go run generate.go drivers/gpu/drm/drm_blend.c "overview" "plane blending properties"
//go:generate go run generate.go drivers/gpu/drm/drm_color_mgmt.c "overview" "color management properties"
//go:generate go run generate.go drivers/gpu/drm/drm_atomic_uapi.c "explicit fencing properties"


@@ 25,21 26,23 @@ func Prop(obj drm.ObjectType, name string) string {
		if doc, ok := standardCRTCProperties[name]; ok {
			return doc
		}
		if doc, ok := colorManagementProperties[name]; ok {
	case drm.ObjectPlane:
		if doc, ok := standardPlaneProperties[name]; ok {
			return doc
		}
	case drm.ObjectPlane:
		if doc, ok := planeBlendingProperties[name]; ok {
			return doc
		}
	}
	// Explicit fencing and VRR docs contain mixed plane, connector and CRTC
	// props
	// The following docs contain mixed plane, connector and CRTC props
	if doc, ok := explicitFencingProperties[name]; ok {
		return doc
	}
	if doc, ok := variableRefreshProperties[name]; ok {
		return doc
	}
	if doc, ok := colorManagementProperties[name]; ok {
		return doc
	}
	return ""
}

M drmdoc/plane-blending-properties.go => drmdoc/plane-blending-properties.go +1 -2
@@ 9,8 9,7 @@ var planeBlendingProperties = map[string]string{
	"CRTC_X":           "X coordinate offset for the destination rectangle. Can be negative.",
	"CRTC_Y":           "Y coordinate offset for the destination rectangle. Can be negative.",
	"FB_ID":            "Mode object ID of the &drm_framebuffer this plane should scan out.",
	"IN_FORMATS":       "Blob property which contains the set of buffer format and modifier\npairs supported by this plane. The blob is a drm_format_modifier_blob\nstruct. Without this property the plane doesn't support buffers with\nmodifiers. Userspace cannot change this property.",
	"SCALING_FILTER":   "Indicates scaling filter to be used for plane scaler\n\nThe value of this property can be one of the following:\nDefault:\n        Driver's default scaling filter\nNearest Neighbor:\n        Nearest Neighbor scaling filter",
	"SCALING_FILTER":   "Indicates scaling filter to be used for plane scaler\n\nThe value of this property can be one of the following:\n\nDefault:\n        Driver's default scaling filter\nNearest Neighbor:\n        Nearest Neighbor scaling filter",
	"SRC_H":            "Height for the source rectangle within the &drm_framebuffer, in 16.16\nfixed point. SRC_Y plus SRC_H must be within the height of the source\nframebuffer. Must be positive.",
	"SRC_W":            "Width for the source rectangle within the &drm_framebuffer, in 16.16\nfixed point. SRC_X plus SRC_W must be within the width of the source\nframebuffer. Must be positive.",
	"SRC_X":            "X coordinate offset for the source rectangle within the\n&drm_framebuffer, in 16.16 fixed point. Must be positive.",

M drmdoc/standard-crtc-properties.go => drmdoc/standard-crtc-properties.go +1 -1
@@ 5,5 5,5 @@ package drmdoc
var standardCRTCProperties = map[string]string{
	"ACTIVE":         "Atomic property for setting the power state of the CRTC. When set to 1\nthe CRTC will actively display content. When set to 0 the CRTC will be\npowered off. There is no expectation that user-space will reset CRTC\nresources like the mode and planes when setting ACTIVE to 0.\n\nUser-space can rely on an ACTIVE change to 1 to never fail an atomic\ntest as long as no other property has changed. If a change to ACTIVE\nfails an atomic test, this is a driver bug. For this reason setting\nACTIVE to 0 must not release internal resources (like reserved memory\nbandwidth or clock generators).\n\nNote that the legacy DPMS property on connectors is internally routed\nto control this property for atomic drivers.",
	"MODE_ID":        "Atomic property for setting the CRTC display timings. The value is the\nID of a blob containing the DRM mode info. To disable the CRTC,\nuser-space must set this property to 0.\n\nSetting MODE_ID to 0 will release reserved resources for the CRTC.",
	"SCALING_FILTER": "Atomic property for setting the scaling filter for CRTC scaler\n\nThe value of this property can be one of the following:\nDefault:\n\tDriver's default scaling filter\nNearest Neighbor:\n\tNearest Neighbor scaling filter",
	"SCALING_FILTER": "Atomic property for setting the scaling filter for CRTC scaler\n\nThe value of this property can be one of the following:\n\nDefault:\n\tDriver's default scaling filter\nNearest Neighbor:\n\tNearest Neighbor scaling filter",
}

A drmdoc/standard-plane-properties.go => drmdoc/standard-plane-properties.go +7 -0
@@ 0,0 1,7 @@
// Code generated by running "go generate". DO NOT EDIT.

package drmdoc

var standardPlaneProperties = map[string]string{
	"IN_FORMATS": "Blob property which contains the set of buffer format and modifier\npairs supported by this plane. The blob is a struct\ndrm_format_modifier_blob. Without this property the plane doesn't\nsupport buffers with modifiers. Userspace cannot change this property.",
}