This patch introduce a callback function "get_crc_sources" which
will be called during read of control node. It is an optional
callback function and if driver implements this callback, driver
should return a constant pointer to an array of crc sources list
and update count according to the number of source in the list.
Changes Since V1: (Daniel)
- return const pointer to an array of crc sources list
- do validation of sources in CRC-core
Changes Since V2:
- update commit message
- update …
[View More]callback documentation
- print one source name per line
Signed-off-by: Mahesh Kumar <mahesh1.kumar(a)intel.com>
Cc: dri-devel(a)lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
---
drivers/gpu/drm/drm_debugfs_crc.c | 23 ++++++++++++++++++++++-
include/drm/drm_crtc.h | 22 ++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index 1956acb61cc8..940b76a1ab71 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -68,8 +68,29 @@ static int crc_control_show(struct seq_file *m, void *data)
{
struct drm_crtc *crtc = m->private;
- seq_printf(m, "%s\n", crtc->crc.source);
+ if (crtc->funcs->get_crc_sources) {
+ size_t count;
+ const char *const *sources = crtc->funcs->get_crc_sources(crtc,
+ &count);
+ size_t values_cnt;
+ int i;
+
+ if (count == 0 || !sources)
+ goto out;
+
+ for (i = 0; i < count; i++)
+ if (!crtc->funcs->verify_crc_source(crtc, sources[i],
+ &values_cnt)) {
+ if (strcmp(sources[i], crtc->crc.source))
+ seq_printf(m, "%s\n", sources[i]);
+ else
+ seq_printf(m, "%s*\n", sources[i]);
+ }
+ }
+ return 0;
+out:
+ seq_printf(m, "%s*\n", crtc->crc.source);
return 0;
}
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 3ce5d2fe133d..69886025e628 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -699,6 +699,28 @@ struct drm_crtc_funcs {
*/
int (*verify_crc_source)(struct drm_crtc *crtc, const char *source,
size_t *values_cnt);
+ /**
+ * @get_crc_sources:
+ *
+ * Driver callback for getting a list of all the available sources for
+ * CRC generation. This callback depends upon verify_crc_source, So
+ * verify_crc_source callback should be implemented before implementing
+ * this. Driver can pass full list of available crc sources, this
+ * callback does the verification on each crc-source before passing it
+ * to userspace.
+ *
+ * This callback is optional if the driver does not support exporting of
+ * possible CRC sources list.
+ *
+ * RETURNS:
+ *
+ * a constant character pointer to the list of all the available CRC
+ * sources. On failure driver should return NULL. count should be
+ * updated with number of sources in list. if zero we don't process any
+ * source from the list.
+ */
+ const char *const *(*get_crc_sources)(struct drm_crtc *crtc,
+ size_t *count);
/**
* @atomic_print_state:
--
2.16.2
[View Less]
Currently, we are trying to make VKMS pass in the kms_flip test (IGT).
As a result, we made a series of small changes in the module with the
goal to meet some of the necessary steps required by kms_flip. This
patchset comprises all the simple modifications used until now to make
the kms_flip partially works. It is important to highlight, that VKMS
still not pass in the kms_flip, but I send these modifications with the
intention to avoid rework.
Changes in V2:
- Add dumb buffer support
…
[View More]Rodrigo Siqueira (5):
drm/vkms: Add dumb operations
drm/vkms: Add helper for framebuffer create
drm/vkms: Add atomic helpers functions
drm/vkms: Add connectors helpers
drm/vkms: Add plane helper struct
drivers/gpu/drm/vkms/Makefile | 2 +-
drivers/gpu/drm/vkms/vkms_crtc.c | 18 ++++
drivers/gpu/drm/vkms/vkms_drv.c | 18 ++--
drivers/gpu/drm/vkms/vkms_drv.h | 30 ++++++
drivers/gpu/drm/vkms/vkms_gem.c | 168 +++++++++++++++++++++++++++++
drivers/gpu/drm/vkms/vkms_output.c | 27 +++++
drivers/gpu/drm/vkms/vkms_plane.c | 18 ++++
7 files changed, 274 insertions(+), 7 deletions(-)
create mode 100644 drivers/gpu/drm/vkms/vkms_gem.c
--
2.17.1
[View Less]
The timespec structure and associated interfaces are deprecated and will
be removed in the future because of the y2038 overflow.
The use of ktime_to_timespec() in timeout_to_jiffies() does not
suffer from that overflow, but is easy to avoid by just converting
the ktime_t into jiffies directly.
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
drivers/gpu/drm/msm/msm_drv.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/…
[View More]drm/msm/msm_drv.h
index b2da1fbf81e0..cc8977476a41 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -353,8 +353,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout)
remaining_jiffies = 0;
} else {
ktime_t rem = ktime_sub(*timeout, now);
- struct timespec ts = ktime_to_timespec(rem);
- remaining_jiffies = timespec_to_jiffies(&ts);
+ remaining_jiffies = ktime_divns(rem, NSEC_PER_SEC / HZ);
}
return remaining_jiffies;
--
2.9.0
[View Less]
Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:
ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi.ko] undefined!
ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] undefined!
This solves the problem by adding a silent symbol for the tcon_top module,
building it as a separate module in exactly the cases that we need it,
but in a way that it is …
[View More]reachable by the other modules.
Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs")
Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
v2: link the tcon top module separately instead of into the mixer
---
drivers/gpu/drm/sun4i/Kconfig | 7 +++++++
drivers/gpu/drm/sun4i/Makefile | 3 ++-
drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++-
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 3 ++-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig
index 156a865c3e6d..c2c042287c19 100644
--- a/drivers/gpu/drm/sun4i/Kconfig
+++ b/drivers/gpu/drm/sun4i/Kconfig
@@ -68,4 +68,11 @@ config DRM_SUN8I_MIXER
graphics mixture and feed graphics to TCON, If M is
selected the module will be called sun8i-mixer.
+config DRM_SUN8I_TCON_TOP
+ tristate
+ default DRM_SUN4I if DRM_SUN8I_MIXER!=n
+ help
+ TCON TOP is responsible for configuring display pipeline for
+ HTMI, TVE and LCD.
+
endif
diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile
index cd27d02c94e2..0eb38ac8e86e 100644
--- a/drivers/gpu/drm/sun4i/Makefile
+++ b/drivers/gpu/drm/sun4i/Makefile
@@ -39,4 +39,5 @@ endif
obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o
obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o
obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o
-obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o sun8i_tcon_top.o
+obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o
+obj-$(CONFIG_DRM_SUN8I_TCON_TOP) += sun8i_tcon_top.o
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 6ddf4eaccb40..495d0fc41297 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -216,7 +216,8 @@ static bool sun4i_drv_node_is_tcon_with_ch0(struct device_node *node)
static bool sun4i_drv_node_is_tcon_top(struct device_node *node)
{
- return !!of_match_node(sun8i_tcon_top_of_table, node);
+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
+ !!of_match_node(sun8i_tcon_top_of_table, node);
}
static int compare_of(struct device *dev, void *data)
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
index 3459b9ec56c9..3704d95874c2 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
@@ -44,7 +44,8 @@ sun8i_dw_hdmi_mode_valid(struct drm_connector *connector,
static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node)
{
- return !!of_match_node(sun8i_tcon_top_of_table, node);
+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) &&
+ !!of_match_node(sun8i_tcon_top_of_table, node);
}
static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm,
--
2.9.0
[View Less]
From: Hans Verkuil <hans.verkuil(a)cisco.com>
This patch series adds support for the DisplayPort CEC-Tunneling-over-AUX
feature. This patch series is based on top of drm-intel-next.
The v10 is identical to v9, except it is rebased to drm-intel-next (v9
didn't apply cleanly) and two alignment warnings have been fixed.
The cover letter of v8 can be found here:
https://www.spinics.net/lists/dri-devel/msg181688.html
Regards,
Hans
Hans Verkuil (3):
drm: add support for DisplayPort …
[View More]CEC-Tunneling-over-AUX
drm-kms-helpers.rst: document the DP CEC helpers
drm/i915: add DisplayPort CEC-Tunneling-over-AUX support
Documentation/gpu/drm-kms-helpers.rst | 9 +
drivers/gpu/drm/Kconfig | 10 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/drm_dp_cec.c | 428 ++++++++++++++++++++++++++
drivers/gpu/drm/drm_dp_helper.c | 1 +
drivers/gpu/drm/i915/intel_dp.c | 17 +-
include/drm/drm_dp_helper.h | 56 ++++
7 files changed, 520 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/drm_dp_cec.c
--
2.18.0
[View Less]
From: Hans Verkuil <hans.verkuil(a)cisco.com>
This patch series adds support for the DisplayPort CEC-Tunneling-over-AUX
feature. This patch series is based on the current media master branch
(https://git.linuxtv.org/media_tree.git/log/) but it applies fine on top
of the current mainline tree.
The v9 is identical to v8, the only change is that it is now also CCed to
intel-gfx(a)lists.freedesktop.org.
The cover letter of v8 can be found here:
https://www.spinics.net/lists/dri-devel/…
[View More]msg181688.html
Regards,
Hans
Hans Verkuil (3):
drm: add support for DisplayPort CEC-Tunneling-over-AUX
drm-kms-helpers.rst: document the DP CEC helpers
drm/i915: add DisplayPort CEC-Tunneling-over-AUX support
Documentation/gpu/drm-kms-helpers.rst | 9 +
drivers/gpu/drm/Kconfig | 10 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/drm_dp_cec.c | 427 ++++++++++++++++++++++++++
drivers/gpu/drm/drm_dp_helper.c | 1 +
drivers/gpu/drm/i915/intel_dp.c | 17 +-
include/drm/drm_dp_helper.h | 56 ++++
7 files changed, 519 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpu/drm/drm_dp_cec.c
--
2.18.0
[View Less]