drm: LogiCVC display controller support
Subsystems (6)
v10 cover drm: LogiCVC display controller support
This series introduces support for the LogiCVC display controller. The controller is a bit unusual since it is usually loaded as programmable logic on Xilinx FPGAs or Zynq-7000 SoCs. More details are presented on the main commit for the driver.
More information about the controller is available on the dedicated web page: https://www.logicbricks.com/Products/logiCVC-ML.aspx
Note that this driver has rather simple connector management, which was not converted to drm_panel_bridge to keep the ability to enable the panel at first vblank but also to support DVI.
Changes since v9:
- Added common compatibles for major logicvc versions;
- Add support for logicvc-5;
- Rebased on latest drm-misc next.
Changes since v8:
- Rebased on top of the latest drm-misc-next;
- Dropped useless phandle-based syscon regmap support;
- Switched to a single-port graph description;
- Updated the device-tree schema to the port schema and added a description for the port.
Change since v7:
- Replaced DRM_INFO/DRM_ERROR/DRM_DEBUG_DRIVER with fashions using drm_device;
- Fixed yaml binding alignment issue;
- Renamed logicvc-display name to the generic "display" name;
- Added patternProperties match for display in the parent mfd binding;
- Used drm_atomic_get_new_crtc_state when needed;
- Checked mode in mode_valid instead of atomic_check;
- Switched to drmm_mode_config_init;
- Removed useless logicvc_connector_destroy wrapper;
- Removed useless drm_dev_put calls;
- Removed atomic_commit_tail that enables the panel and streamlined the logic;
- Reworked Makefile cosmetics;
- Fixed checkpatch issues.
Changes since v6:
- Updated to the latest DRM internal API changes;
- Used an enum to index dt properties instead of the name string.
Changes since v5:
- Subclass DRM device and use devm_drm_dev_alloc for allocation;
- Removed call to drm_mode_config_cleanup (done automatically with devm);
- Some related code cleanups;
- Bring back not-for-merge patch adding colorkey support.
Changes since v4:
- Updated to internal DRM API changes (rebased on drm-misc-next);
- Added Kconfig dependency on OF;
- Added MAINTAINERS entry;
- Used drm_err and dev_err instead of DRM_ERROR where possible;
- Various cosmetic changes.
Changes since v3:
- Rebased on latest drm-misc;
- Improved event lock wrapping;
- Added collect tag;
- Added color-key support patch (not for merge, for reference only).
Changes since v2:
- Fixed and slightly improved dt schema.
Changes since v1:
- Switched dt bindings documentation to dt schema;
- Described more possible dt parameters;
- Added support for the lvds-3bit interface;
- Added support for grabbing syscon regmap from parent node;
- Removed layers count property and count layers child nodes instead.
Paul Kocialkowski (6):
dt-bindings: mfd: logicvc: Add a compatible with the major version
only
dt-bindings: gpio: logicvc: Add a compatible with major version only
gpio: logicvc: Support compatible with major version only
dt-bindings: display: Add compatibles with major versions only
drm: Add support for the LogiCVC display controller
NOTFORMERGE: drm/logicvc: Add plane colorkey support
.../display/xylon,logicvc-display.yaml | 3 + .../bindings/gpio/xylon,logicvc-gpio.yaml | 1 + .../bindings/mfd/xylon,logicvc.yaml | 1 + MAINTAINERS | 6 + drivers/gpio/gpio-logicvc.c | 5 +- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/logicvc/Kconfig | 9 + drivers/gpu/drm/logicvc/Makefile | 9 + drivers/gpu/drm/logicvc/logicvc_crtc.c | 280 +++++++ drivers/gpu/drm/logicvc/logicvc_crtc.h | 21 + drivers/gpu/drm/logicvc/logicvc_drm.c | 483 +++++++++++ drivers/gpu/drm/logicvc/logicvc_drm.h | 67 ++ drivers/gpu/drm/logicvc/logicvc_interface.c | 214 +++++ drivers/gpu/drm/logicvc/logicvc_interface.h | 28 + drivers/gpu/drm/logicvc/logicvc_layer.c | 767 ++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_layer.h | 71 ++ drivers/gpu/drm/logicvc/logicvc_mode.c | 80 ++ drivers/gpu/drm/logicvc/logicvc_mode.h | 15 + drivers/gpu/drm/logicvc/logicvc_of.c | 185 +++++ drivers/gpu/drm/logicvc/logicvc_of.h | 46 ++ drivers/gpu/drm/logicvc/logicvc_regs.h | 88 ++ 22 files changed, 2379 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/logicvc/Kconfig create mode 100644 drivers/gpu/drm/logicvc/Makefile create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_regs.h
Signature · 1 line
2.34.1
PATCH v10 1/6 dt-bindings: mfd: logicvc: Add a compatible with the major version only
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
Introduce a new compatible with the major version only.
--- Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml +1 -0
@@ -20,6 +20,7 @@ properties: items: - enum: - xylon,logicvc-3.02.a + - xylon,logicvc-3 - const: syscon - const: simple-mfd
Signature · 1 line
2.34.1
Re: [PATCH v10 1/6] dt-bindings: mfd: logicvc: Add a compatible with the major version only
Quoted 11 lines · Paul Kocialkowski
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
Introduce a new compatible with the major version only.
Signed-off-by Paul Kocialkowski <[email protected]>--- Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH v10 2/6 dt-bindings: gpio: logicvc: Add a compatible with major version only
In reply to Paul KocialkowskiThere are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
Introduce a new compatible with the major version only.
--- Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml +1 -0
@@ -30,6 +30,7 @@ properties: compatible: enum: - xylon,logicvc-3.02.a-gpio + - xylon,logicvc-3-gpio reg: maxItems: 1
Signature · 1 line
2.34.1
Re: [PATCH v10 2/6] dt-bindings: gpio: logicvc: Add a compatible with major version only
Quoted 3 lines · Paul Kocialkowski
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
The reason we try to be precise is because sometime, long after the driver has been merged and maintained for a few years, a bug is discovered in a specific version of the silicon.
What happens is that a fix is applied on all silicon whether it is needed or not.
If you have the precise silicon compatible, you can avoid this and target only a specific version.
Yours,
Linus Walleij
Re: [PATCH v10 2/6] dt-bindings: gpio: logicvc: Add a compatible with major version only
Quoted 11 lines · Linus Walleij
Quoted 3 lines · Paul Kocialkowski
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
The reason we try to be precise is because sometime, long after the driver has been merged and maintained for a few years, a bug is discovered in a specific version of the silicon.
Quoted 5 lines
What happens is that a fix is applied on all silicon whether it is needed or not.
If you have the precise silicon compatible, you can avoid this and target only a specific version.
Indeed, the better approach would be something like:
compatible:
oneOf:
- items:
- enum:
- foo,bar-v1.0
- foo,bar,v1.1
- const: foo,bar-v1
- items:
- enum:
- foo,bar-v2.0
- const: foo,bar-v2
That way the DTs are future-proof, while drivers can still match on only the less-specific strings until a need arises. Plus it avoids the problem that if an existing OS that only understands "foo,bar-v1.0" is given a new DT with only "foo,bar-v1" for v1.0 hardware it won't be able to use the device, even though it's *functionally* capable of doing so.
However, from skimming patch #5, it looks possible that none of these changes are needed at all. If LOGICVC_IP_VERSION_REG tells you the exact revision, and is always present (as the unconditional reading of it implies), then the only reason for adding new compatibles would be if, say, v5 has more clocks from v4 and you want the binding to enforce that; otherwise, newer versions are literally compatible with the currently-defined binding and therefore should continue to bind against the existing string(s) to maximise forward- and backward-compatibility. Sure, it's not the prettiest thing for a "generic" compatible to be based on an oddly-specific version number that doesn't necessarily match the actual software-discoverable version, but what's done is done and that's the cost of ABI.
Cheers,
Robin.
(also, nitpick for that part of patch #5 since I'm here: please include linux/bitfield.h rather than reinventing FIELD_GET() locally)
Re: [PATCH v10 2/6] dt-bindings: gpio: logicvc: Add a compatible with major version only
Hi,
Quoted 32 lines · Robin Murphy
Quoted 11 lines · Linus Walleij
Quoted 3 lines · Paul Kocialkowski
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
The reason we try to be precise is because sometime, long after the driver has been merged and maintained for a few years, a bug is discovered in a specific version of the silicon.
Quoted 5 lines
What happens is that a fix is applied on all silicon whether it is needed or not.
If you have the precise silicon compatible, you can avoid this and target only a specific version.
Indeed, the better approach would be something like:
compatible:
oneOf:
- items:
- enum:
- foo,bar-v1.0
- foo,bar,v1.1
- const: foo,bar-v1
- items:
- enum:
- foo,bar-v2.0
- const: foo,bar-v2
Quoted 5 lines
That way the DTs are future-proof, while drivers can still match on only the less-specific strings until a need arises. Plus it avoids the problem that if an existing OS that only understands "foo,bar-v1.0" is given a new DT with only "foo,bar-v1" for v1.0 hardware it won't be able to use the device, even though it's *functionally* capable of doing so.
Yes I understand that we need to keep compatibility with the already-defined compatible.
Quoted 4 lines
However, from skimming patch #5, it looks possible that none of these changes are needed at all. If
LOGICVC_IP_VERSION_REGtells you the exact revision, and is always present (as the unconditional reading of it implies), then the only reason for adding new compatibles would be if, say,
Quoted 8 lines
v5 has more clocks from v4 and you want the binding to enforce that; otherwise, newer versions are literally compatible with the currently-defined binding and therefore should continue to bind against the existing string(s) to maximise forward- and backward-compatibility. Sure, it's not the prettiest thing for a "generic" compatible to be based on an oddly-specific version number that doesn't necessarily match the actual software-discoverable version, but what's done is done and that's the cost of ABI.
Indeed it's true that hardware quirks can be applied based on the precise version read from the register, so I don't think there is a need for overly precise compatibles.
Since the device-tree binding is currently the same for all versions, I understand that it makes sense to keep a single compatible (the already defined one), so I guess I will make another iteration without introducing new compatibles. But I will probably update the binding document to reflect which versions are currently known to work with its current state.
Quoted 2 lines
(also, nitpick for that part of patch #5 since I'm here: please include
linux/bitfield.hrather than reinventingFIELD_GET()locally)
Ah good to know thanks, first time hearing about those.
Paul
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
PATCH v10 3/6 gpio: logicvc: Support compatible with major version only
In reply to Paul KocialkowskiSupport the newly-introduced common compatible for version 3.
--- drivers/gpio/gpio-logicvc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpio/gpio-logicvc.c +2 -3
@@ -145,9 +145,8 @@ static int logicvc_gpio_probe(struct platform_device *pdev) }static const struct of_device_id logicivc_gpio_of_table[] = { - { - .compatible ="xylon,logicvc-3.02.a-gpio" , - }, + { .compatible ="xylon,logicvc-3.02.a-gpio" }, + { .compatible ="xylon,logicvc-3-gpio" }, { } };
Signature · 1 line
2.34.1
Re: [PATCH v10 3/6] gpio: logicvc: Support compatible with major version only
Quoted 3 lines · Paul Kocialkowski
Support the newly-introduced common compatible for version 3.
Signed-off-by Paul Kocialkowski <[email protected]>
Are there dependencies between the GPIO patches and the rest? Doesn't look like that.
Can Bartosz just merge the GPIO stuff to the GPIO tree?
Yours,
Linus Walleij
Re: [PATCH v10 3/6] gpio: logicvc: Support compatible with major version only
Hi,
Quoted 5 lines · Linus Walleij
Quoted 2 lines · Paul Kocialkowski
Support the newly-introduced common compatible for version 3.
Quoted 7 lines
Quoted 1 line
Signed-off-by Paul Kocialkowski <[email protected]>Reviewed-by Linus Walleij <[email protected]>Are there dependencies between the GPIO patches and the rest? Doesn't look like that.
Can Bartosz just merge the GPIO stuff to the GPIO tree?
Yeah I think it's independent, no dependencies.
Paul
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Re: [PATCH v10 3/6] gpio: logicvc: Support compatible with major version only
In reply to Linus WalleijQuoted 8 lines · Linus Walleij
Quoted 3 lines · Paul Kocialkowski
Support the newly-introduced common compatible for version 3.
Signed-off-by Paul Kocialkowski <[email protected]>
Quoted 8 lines
Reviewed-by Linus Walleij <[email protected]>Are there dependencies between the GPIO patches and the rest? Doesn't look like that.
Can Bartosz just merge the GPIO stuff to the GPIO tree?Yours,
Linus Walleij
Except I'm seeing there's no agreement on the actual compatible yet in the previous patch.
Bart
Re: [PATCH v10 3/6] gpio: logicvc: Support compatible with major version only
Quoted 15 lines · Bartosz Golaszewski
Quoted 14 lines · Linus Walleij
Quoted 3 lines · Paul Kocialkowski
Support the newly-introduced common compatible for version 3.
Signed-off-by Paul Kocialkowski <[email protected]>Reviewed-by Linus Walleij <[email protected]>Are there dependencies between the GPIO patches and the rest? Doesn't look like that.
Can Bartosz just merge the GPIO stuff to the GPIO tree?
Quoted 5 lines
Quoted 2 lines
Yours,
Linus WalleijExcept I'm seeing there's no agreement on the actual compatible yet in the previous patch.
Yeah I noticed that after writing that :/
Yours,
Linus Walleij
PATCH v10 4/6 dt-bindings: display: Add compatibles with major versions only
In reply to Paul KocialkowskiThere are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
Add common compatibles that only list the major version instead.
--- .../devicetree/bindings/display/xylon,logicvc-display.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/display/xylon,logicvc-display.yaml +3 -0
@@ -30,7 +30,10 @@ properties: compatible: enum: - xylon,logicvc-3.02.a-display + - xylon,logicvc-3-display - xylon,logicvc-4.01.a-display + - xylon,logicvc-4-display + - xylon,logicvc-5-display reg: maxItems: 1
Signature · 1 line
2.34.1
Re: [PATCH v10 4/6] dt-bindings: display: Add compatibles with major versions only
Quoted 7 lines · Paul Kocialkowski
There are lots of different versions of the logicvc block and it makes little sense to list them all in compatibles since all versions with the same major are found to be register-compatible.
Add common compatibles that only list the major version instead.
Signed-off-by Paul Kocialkowski <[email protected]>
Same comment as the other binding patch.
Yours,
Linus Walleij
PATCH v10 5/6 drm: Add support for the LogiCVC display controller
In reply to Paul KocialkowskiIntroduces a driver for the LogiCVC display controller, a programmable logic controller optimized for use in Xilinx Zynq-7000 SoCs and other Xilinx FPGAs. The controller is mostly configured at logic synthesis time so only a subset of configuration is left for the driver to handle.
The following features are implemented and tested:
- LVDS 4-bit interface;
- RGB565 pixel formats;
- Multiple layers and hardware composition;
- Layer-wide alpha mode;
The following features are implemented but untested:
- Other RGB pixel formats;
- Layer framebuffer configuration for version 4;
- Lowest-layer used as background color;
- Per-pixel alpha mode.
The following features are not implemented:
- YUV pixel formats;
- DVI, LVDS 3-bit, ITU656 and camera link interfaces;
- External parallel input for layer;
- Color-keying;
- LUT-based alpha modes.
Additional implementation-specific notes:
- Panels are only enabled after the first page flip to avoid flashing a white screen.
- Depth used in context of the LogiCVC driver only counts color components to match the definition of the synthesis parameters.
Support is implemented for both version 3 and 4 of the controller.
With version 3, framebuffers are stored in a dedicated contiguous memory area, with a base address hardcoded for each layer. This requires using a dedicated CMA pool registered at the base address and tweaking a few offset-related registers to try to use any buffer allocated from the pool. This is done on a best-effort basis to have the hardware cope with the DRM framebuffer allocation model and there is no guarantee that each buffer allocated by GEM CMA can be used for any layer. In particular, buffers allocated below the base address for a layer are guaranteed not to be configurable for that layer. See the implementation of logicvc_layer_buffer_find_setup for specifics.
Version 4 allows configuring each buffer address directly, which guarantees that any buffer can be configured.
--- MAINTAINERS | 6 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/logicvc/Kconfig | 9 + drivers/gpu/drm/logicvc/Makefile | 9 + drivers/gpu/drm/logicvc/logicvc_crtc.c | 280 +++++++++ drivers/gpu/drm/logicvc/logicvc_crtc.h | 21 + drivers/gpu/drm/logicvc/logicvc_drm.c | 483 +++++++++++++++ drivers/gpu/drm/logicvc/logicvc_drm.h | 64 ++ drivers/gpu/drm/logicvc/logicvc_interface.c | 214 +++++++ drivers/gpu/drm/logicvc/logicvc_interface.h | 28 + drivers/gpu/drm/logicvc/logicvc_layer.c | 628 ++++++++++++++++++++ drivers/gpu/drm/logicvc/logicvc_layer.h | 64 ++ drivers/gpu/drm/logicvc/logicvc_mode.c | 80 +++ drivers/gpu/drm/logicvc/logicvc_mode.h | 15 + drivers/gpu/drm/logicvc/logicvc_of.c | 185 ++++++ drivers/gpu/drm/logicvc/logicvc_of.h | 46 ++ drivers/gpu/drm/logicvc/logicvc_regs.h | 88 +++ 18 files changed, 2223 insertions(+) create mode 100644 drivers/gpu/drm/logicvc/Kconfig create mode 100644 drivers/gpu/drm/logicvc/Makefile create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_crtc.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_drm.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_interface.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_layer.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_mode.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.c create mode 100644 drivers/gpu/drm/logicvc/logicvc_of.h create mode 100644 drivers/gpu/drm/logicvc/logicvc_regs.h
MAINTAINERS +6 -0
@@ -6012,6 +6012,12 @@ S: Orphan / Obsolete F: drivers/gpu/drm/i810/ F: include/uapi/drm/i810_drm.h +DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER +M: Paul Kocialkowski <[email protected]> +S: Supported +T: git git://anongit.freedesktop.org/drm/drm-misc +F: drivers/gpu/drm/logicvc/ + DRM DRIVER FOR LVDS PANELS M: Laurent Pinchart <[email protected]> L: [email protected]
drivers/gpu/drm/Kconfig +2 -0
@@ -373,6 +373,8 @@ source "drivers/gpu/drm/etnaviv/Kconfig" source "drivers/gpu/drm/hisilicon/Kconfig" +source "drivers/gpu/drm/logicvc/Kconfig" + source "drivers/gpu/drm/mediatek/Kconfig" source "drivers/gpu/drm/mxsfb/Kconfig"
drivers/gpu/drm/Makefile +1 -0
@@ -110,6 +110,7 @@ obj-$(CONFIG_DRM_STM) += stm/ obj-$(CONFIG_DRM_STI) += sti/ obj-y += imx/ obj-$(CONFIG_DRM_INGENIC) += ingenic/ +obj-$(CONFIG_DRM_LOGICVC) += logicvc/ obj-$(CONFIG_DRM_MEDIATEK) += mediatek/ obj-$(CONFIG_DRM_MESON) += meson/ obj-y += i2c/
drivers/gpu/drm/logicvc/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config DRM_LOGICVC + tristate "LogiCVC DRM" + depends on DRM + depends on OF || COMPILE_TEST + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + help + DRM display driver for the logiCVC programmable logic block from Xylon
drivers/gpu/drm/logicvc/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +logicvc-drm-y += \ + logicvc_crtc.o \ + logicvc_drm.o \ + logicvc_interface.o \ + logicvc_layer.o \ + logicvc_mode.o \ + logicvc_of.o + +obj-$(CONFIG_DRM_LOGICVC) += logicvc-drm.o
drivers/gpu/drm/logicvc/logicvc_crtc.c new file +280 -0
280 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_crtc.h new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_CRTC_H_ +#define _LOGICVC_CRTC_H_ + +struct drm_pending_vblank_event ; +struct logicvc_drm ; + +struct logicvc_crtc { +struct drm_crtc drm_crtc; +struct drm_pending_vblank_event *event; +}; + +void logicvc_crtc_vblank_handler (struct logicvc_drm *logicvc); +int logicvc_crtc_init (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_drm.c new file +483 -0
483 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_drm.h new file +64 -0
64 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_interface.c new file +214 -0
214 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_interface.h new file +28 -0
@@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_INTERFACE_H_ +#define _LOGICVC_INTERFACE_H_ + +#include <drm/drm_bridge.h> +#include <drm/drm_connector.h> +#include <drm/drm_encoder.h> +#include <drm/drm_panel.h> + +struct logicvc_drm ; + +struct logicvc_interface { +struct drm_encoder drm_encoder; +struct drm_connector drm_connector; + +struct drm_panel *drm_panel; +struct drm_bridge *drm_bridge; +}; + +void logicvc_interface_attach_crtc (struct logicvc_drm *logicvc); +int logicvc_interface_init (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_layer.c new file +628 -0
628 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_layer.h new file +64 -0
64 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_mode.c new file +80 -0
80 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_mode.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019 Bootlin +* Author: Paul Kocialkowski <[email protected]> +*/ + +#ifndef _LOGICVC_MODE_H_ +#define _LOGICVC_MODE_H_ + +struct logicvc_drm ; + +int logicvc_mode_init (struct logicvc_drm *logicvc); +void logicvc_mode_fini (struct logicvc_drm *logicvc); + +#endif
drivers/gpu/drm/logicvc/logicvc_of.c new file +185 -0
185 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_of.h new file +46 -0
46 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_regs.h new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v10 6/6 NOTFORMERGE: drm/logicvc: Add plane colorkey support
In reply to Paul Kocialkowski--- drivers/gpu/drm/logicvc/logicvc_drm.h | 3 + drivers/gpu/drm/logicvc/logicvc_layer.c | 151 +++++++++++++++++++++++- drivers/gpu/drm/logicvc/logicvc_layer.h | 7 ++ 3 files changed, 155 insertions(+), 6 deletions(-)
drivers/gpu/drm/logicvc/logicvc_drm.h +3 -0
@@ -59,6 +59,9 @@ struct logicvc_drm {struct list_head layers_list;struct logicvc_crtc *crtc;struct logicvc_interface *interface; + +struct drm_property *colorkey_enabled_property; + struct drm_property *colorkey_value_property; };#endif
drivers/gpu/drm/logicvc/logicvc_layer.c +145 -6
214 lines not on this page · raw message
drivers/gpu/drm/logicvc/logicvc_layer.h +7 -0
@@ -39,6 +39,13 @@ struct logicvc_layer_formats {uint32_t *formats; }; +struct logicvc_layer_state { +struct drm_plane_state drm_plane_state; + +bool colorkey_enabled; +uint32_t colorkey_value; +}; +struct logicvc_layer {struct logicvc_layer_config config;struct logicvc_layer_formats *formats;
Signature · 1 line
2.34.1