https://bugs.freedesktop.org/show_bug.cgi?id=75900
Priority: medium
Bug ID: 75900
Assignee: dri-devel(a)lists.freedesktop.org
Summary: GPU lockup or app segfault in several games (bisected)
Severity: major
Classification: Unclassified
OS: Linux (All)
Reporter: b.bellec(a)gmail.com
Hardware: x86-64 (AMD64)
Status: NEW
Version: git
Component: Drivers/Gallium/r600
…
[View More] Product: Mesa
Several Steam games crash since this commit:
67aef6dafa29fed008ea6065c425a6a92a651be9
winsys/radeon: if there's VRAM-only usage, keep it
author: Marek Olšák
Games which crash:
- Left 4 Dead 2: GPU lockup after 15-20 seconds of gameplay. If I set the gfx
details lower, I can play more before a lockup (60 seconds I would say).
- Metro Last Light: GPU lockup
- Serious Sam 3: segfault
What I call a "GPU lockup":
- game freezes
- sound freeze and repeat
- screen is dark
- screen then go in "Out of range" mode
- I need to hard reboot
Games which doesn't crash:
- Half-Life² Episode Two
- Team Fortress 2
- Counter Strike Source
- Unigine Heaven
- Unigine Valley
Hardware:
AMD CYPRESS (HD5850 with 1GB VRAM)
I can also test with RV770 if necessary.
Software:
Fedora 19 x86-64
kernel 3.13.5-101.fc19.x86_64
libdrm 2.4.50
Build:
./autogen.sh --with-gallium-drivers=r600 --with-dri-drivers=
--enable-texture-float --disable-dri3 --disable-r600-llvm-compiler
--disable-gallium-llvm --enable-32-bit CFLAGS="-O2 -m32 -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64" CXXFLAGS="-O2 -m32" --libdir=/usr/lib
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2.
The patchset is based on exynos_drm_next branch.
It is the 3rd iteration of the patches, main changes:
- based on exynos_drm_next branch,
- added video interface bindings between DSI host and slave,
it seems to me to be redundand, and I hope when video interface bindings
…
[View More] will be stabilized it can become optional,
- GPIOs implemented using gpiod framework,
- removed controversial stuff (toshiba bridge implementation and arndale support),
it will be send in another set of patches
Other changes are described in individual patches.
Regards
Andrzej
Andrzej Hajda (12):
drm/mipi_dsi: add flags to DSI messages
drm/mipi_dsi: create dsi devices only for nodes with reg property
drm/exynos: disallow fbdev initialization if no device is connected
exynos/dsim: add DT bindings
drm/exynos: add DSIM driver
panel/s6e8aa0: add DT bindings
drm/panel: add S6E8AA0 driver
ARM: dts: exynos4: add MIPI DSI Master node
ARM: dts: exynos4210-trats: add panel node
ARM: dts: exynos4412-trats2: add panel node
ARM: dts: exynos4210-trats: enable exynos/fimd node
ARM: dts: exynos4412-trats2: enable exynos/fimd node
.../devicetree/bindings/panel/samsung,s6e8aa0.txt | 56 +
.../devicetree/bindings/video/exynos_dsim.txt | 80 +
arch/arm/boot/dts/exynos4.dtsi | 14 +
arch/arm/boot/dts/exynos4210-trats.dts | 61 +
arch/arm/boot/dts/exynos4412-trats2.dts | 70 +
drivers/gpu/drm/drm_mipi_dsi.c | 6 +-
drivers/gpu/drm/exynos/Kconfig | 9 +
drivers/gpu/drm/exynos/Makefile | 1 +
drivers/gpu/drm/exynos/exynos_drm_drv.c | 15 +
drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 +
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1525 ++++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 21 +
drivers/gpu/drm/panel/Kconfig | 7 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-s6e8aa0.c | 1069 ++++++++++++++
include/drm/drm_mipi_dsi.h | 6 +
16 files changed, 2941 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt
create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txt
create mode 100644 drivers/gpu/drm/exynos/exynos_drm_dsi.c
create mode 100644 drivers/gpu/drm/panel/panel-s6e8aa0.c
--
1.8.3.2
[View Less]
The GEM CMA helpers uses a custom mmap implementation based on
remap_pfn_range(). While this works when the buffer DMA and physical
addresses are identical, it fails to take IOMMU into account and tries
to mmap the buffer to userspace using the DMA virtual address instead of
the physical address. This results in mapping random physical pages when
the device is behind an IOMMU.
Use the DMA mapping dma_mmap_writecombine() function instead.
Signed-off-by: Laurent Pinchart <laurent.pinchart+…
[View More]renesas(a)ideasonboard.com>
---
drivers/gpu/drm/drm_gem_cma_helper.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
This patches fixes a problem noticed when enabling IOMMU usage with the Renesas
R-Car DU driver. I've tested it both with the IOMMU enabled and disabled.
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
index 6b51bf9..1d4fd34 100644
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -253,8 +253,17 @@ static int drm_gem_cma_mmap_obj(struct drm_gem_cma_object *cma_obj,
{
int ret;
- ret = remap_pfn_range(vma, vma->vm_start, cma_obj->paddr >> PAGE_SHIFT,
- vma->vm_end - vma->vm_start, vma->vm_page_prot);
+ /*
+ * Clear the VM_PFNMAP flag that was set by drm_gem_mmap(), and set the
+ * vm_pgoff (used as a fake buffer offset by DRM) to 0 as we want to map
+ * the whole buffer.
+ */
+ vma->vm_flags &= ~VM_PFNMAP;
+ vma->vm_pgoff = 0;
+
+ ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma,
+ cma_obj->vaddr, cma_obj->paddr,
+ vma->vm_end - vma->vm_start);
if (ret)
drm_gem_vm_close(vma);
--
Regards,
Laurent Pinchart
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=67110
Priority: medium
Bug ID: 67110
Assignee: dri-devel(a)lists.freedesktop.org
Summary: [radeonsi] Anomaly Warzone Earth games are segfaulting
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: grantipak(a)gmail.com
Hardware: x86 (IA32)
Status: NEW
Version: git
Component: Drivers/Gallium/radeonsi
…
[View More] Product: Mesa
Created attachment 82720
--> https://bugs.freedesktop.org/attachment.cgi?id=82720&action=edit
shader dump from Anomaly with RADEON_DUMP_SHADERS=1
ArchLinux x86; linux 3.10; mesa 9.2git; llvm 3.4svn; Radeon HD 7950
Anomaly Warzone Earth games are segfaulting in random place.
Game update: AppID 91200 "Anomaly Warzone Earth", ProcID 5858, IP 0.0.0.0:0
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
(steam:5732): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that
doesn't believe we're it's parent.
Setting breakpad minidump AppID = 91200
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198026030947 [API loaded no]
GLX_EXT_swap_control not supported, unable to set vertical sync.
AL lib: pulseaudio.c:612: Context did not connect: Access denied
OpenAL sound device name: ALSA Default
Installing breakpad exception handler for
appid(gameoverlayui)/version(20130719102159_client)
Installing breakpad exception handler for
appid(gameoverlayui)/version(1.0_client)
Installing breakpad exception handler for
appid(gameoverlayui)/version(1.0_client)
Installing breakpad exception handler for
appid(gameoverlayui)/version(1.0_client)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70:
non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78:
saw unknown, expected number
(gameoverlayui:5894): Gtk-WARNING **: Загружаемый модуль тем не найден в
module_path: «qtcurve»,
/home/behem0th/.gtkrc-2.0:12: error: scanner: unterminated string constant
[0720/122249:WARNING:proxy_service.cc(958)] PAC support disabled because there
is no system implementation
Game removed: AppID 91200 "Anomaly Warzone Earth", ProcID 5858
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
Previous series revisions & explanation at [1], [2], and [3]
This version of the patch series focuses on isolating the DRM core changes from
individual driver changes to (hopefully) make this a bit easier to merge. New
plane and crtc initialization functions have been added to allow drivers to
migrate to the new infrastructure at their own pace; existing drivers that do
not update should continue to function as expected. The one remaining painful
patch here is patch #12, which replaces …
[View More]crtc->fb with crtc->primary->fb. That
patch is now auto-generated via a Coccinelle semantic patch with the rules
described in the commit message; hopefully that will make life slightly easier
for tree maintainers who want to pull it in.
Daniel mentioned that we should try to merge the underlying infrastructure here
without the actual userspace-facing capability bit to make sure things continue
to run as expected without breaking; I've dropped the capability bit patch for
now, but the previous version from [4] should work on top of this patch set.
I've also dropped the i915 cursor support for the moment to keep the patch set
simple.
I believe the only userspace-visible changes in this series are the plane type
property (which will always return "overlay" since there's no switch to turn on
the other plane types) and max width/height plane properties. I figured
properties were a little bit cleaner than extending GetPlane() to return
additional information, although I can change that if people feel differently.
Presumably we're still going to need a lot more properties that describe the
limits and capabilities of planes as we go forward (stride, scaling, tiling,
etc.)
[1] http://lists.freedesktop.org/archives/dri-devel/2014-March/055855.html
[2] http://lists.freedesktop.org/archives/dri-devel/2014-March/055222.html
[3] http://lists.freedesktop.org/archives/dri-devel/2014-February/054719.html
[4] http://lists.freedesktop.org/archives/dri-devel/2014-March/055216.html
Matt Roper (13):
drm: Add support for multiple plane types (v2)
drm/exynos: Restrict plane loops to only operate on overlay planes
(v2)
drm/i915: Restrict plane loops to only operate on overlay planes (v2)
drm/shmobile: Restrict plane loops to only operate on legacy planes
drm: Make drm_crtc_check_viewport non-static
drm: Add primary plane helpers (v2)
drm: Add drm_universal_plane_init()
drm: Add plane type property (v2)
drm: Add plane max width/height properties
drm: Add drm_crtc_init_with_planes()
drm/msm: Switch to universal plane API's
drm: Replace crtc fb with primary plane fb (v3)
drm: Remove unused drm_crtc->fb
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/armada/armada_crtc.c | 23 +-
drivers/gpu/drm/ast/ast_mode.c | 12 +-
drivers/gpu/drm/bochs/bochs_kms.c | 4 +-
drivers/gpu/drm/cirrus/cirrus_mode.c | 10 +-
drivers/gpu/drm/drm_crtc.c | 228 ++++++++++++++++----
drivers/gpu/drm/drm_crtc_helper.c | 20 +-
drivers/gpu/drm/drm_fb_helper.c | 9 +-
drivers/gpu/drm/drm_plane_helper.c | 312 +++++++++++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 22 +-
drivers/gpu/drm/exynos/exynos_drm_encoder.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_display.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 2 +-
drivers/gpu/drm/gma500/gma_display.c | 16 +-
drivers/gpu/drm/gma500/mdfld_dsi_output.c | 2 +-
drivers/gpu/drm/gma500/mdfld_intel_display.c | 16 +-
drivers/gpu/drm/gma500/oaktrail_crtc.c | 12 +-
drivers/gpu/drm/gma500/psb_intel_display.c | 2 +-
drivers/gpu/drm/gma500/psb_intel_lvds.c | 2 +-
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +-
drivers/gpu/drm/i915/i915_debugfs.c | 4 +-
drivers/gpu/drm/i915/i915_irq.c | 4 +-
drivers/gpu/drm/i915/intel_display.c | 148 +++++++------
drivers/gpu/drm/i915/intel_dp.c | 4 +-
drivers/gpu/drm/i915/intel_fbdev.c | 6 +-
drivers/gpu/drm/i915/intel_overlay.c | 4 +-
drivers/gpu/drm/i915/intel_pm.c | 38 ++--
drivers/gpu/drm/mgag200/mgag200_mode.c | 26 +--
drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 33 +--
drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 8 +-
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 27 +--
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 8 +-
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 20 +-
drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 8 +-
drivers/gpu/drm/nouveau/nv50_display.c | 17 +-
drivers/gpu/drm/omapdrm/omap_crtc.c | 10 +-
drivers/gpu/drm/omapdrm/omap_fb.c | 2 +-
drivers/gpu/drm/qxl/qxl_display.c | 10 +-
drivers/gpu/drm/radeon/atombios_crtc.c | 20 +-
drivers/gpu/drm/radeon/r100.c | 4 +-
drivers/gpu/drm/radeon/radeon_connectors.c | 2 +-
drivers/gpu/drm/radeon/radeon_device.c | 2 +-
drivers/gpu/drm/radeon/radeon_display.c | 4 +-
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 16 +-
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 10 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 16 +-
drivers/gpu/drm/tegra/dc.c | 16 +-
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 +-
drivers/gpu/drm/udl/udl_modeset.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 14 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 8 +-
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 8 +-
drivers/staging/imx-drm/ipuv3-crtc.c | 6 +-
include/drm/drm_crtc.h | 52 ++++-
include/drm/drm_plane_helper.h | 49 +++++
58 files changed, 940 insertions(+), 381 deletions(-)
create mode 100644 drivers/gpu/drm/drm_plane_helper.c
create mode 100644 include/drm/drm_plane_helper.h
Cc: Intel Graphics Development <intel-gfx(a)lists.freedesktop.org>
--
1.8.5.1
[View Less]
The 'slave encoder' structure of the tda998x driver asks for glue
between the DRM driver and the encoder/connector structures.
Changing the tda998x driver to a simple encoder/connector simplifies
the code of the tilcdc driver. This change is permitted by
Russell's infrastructure for componentised subsystems.
The proposed patch set does not include changes to the Armada DRM driver.
These changes should already have been prepared by Russell King, as
told in the message
https://www.mail-…
[View More]archive.com/linux-media@vger.kernel.org/msg71202.html
The tilcdc part of this patch set has not been tested.
This patch set applies after the patchs:
drm/i2c: tda998x: Fix lack of required reg in DT documentation
drm/i2c: tda998x: Change the compatible strings
- v2
- fix lack of call to component_bind_all() in tilcdc_drv.c
- add tda998x configuration for non-DT systems
Jean-Francois Moine (6):
drm/i2c: tda998x: Add the required port property
drm/i2c: tda998x: Move tda998x to a couple encoder/connector
drm/tilcd: dts: Add the video output port
drm/tilcdc: Change the interface with the tda998x driver
drm/tilcd: dts: Remove unused slave description
ARM: AM33XX: dts: Change the tda998x description
.../devicetree/bindings/drm/i2c/tda998x.txt | 11 +-
.../devicetree/bindings/drm/tilcdc/slave.txt | 18 -
.../devicetree/bindings/drm/tilcdc/tilcdc.txt | 14 +
arch/arm/boot/dts/am335x-base0033.dts | 28 +-
arch/arm/boot/dts/am335x-boneblack.dts | 21 +-
drivers/gpu/drm/i2c/tda998x_drv.c | 323 +++++++++-------
drivers/gpu/drm/tilcdc/Makefile | 1 -
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 85 ++++-
drivers/gpu/drm/tilcdc/tilcdc_slave.c | 406 ---------------------
drivers/gpu/drm/tilcdc/tilcdc_slave.h | 26 --
10 files changed, 315 insertions(+), 618 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/drm/tilcdc/slave.txt
delete mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.c
delete mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.h
--
1.9.1
[View Less]
Populate PAR in infoframe structure. If there is a user setting for PAR, then
that value is set. Else, value is taken from CEA mode list if VIC is found.
Else, PAR is calculated from resolution. If none of these conditions are
satisfied, PAR is NONE as per initialization.
As a next step, create a property that would enable a user space app to set
aspect ratio. (will be pushed as a separate patch)
Signed-off-by: Vandana Kannan <vandana.kannan(a)intel.com>
Cc: Jesse Barnes <jesse.…
[View More]barnes(a)intel.com>
Cc: Vijay Purushothaman <vijay.a.purushothaman(a)intel.com>
Cc: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Cc: intel-gfx(a)lists.freedesktop.org
---
drivers/gpu/drm/drm_edid.c | 34 ++++++++++++++++++++++++++++++++++
include/drm/drm_crtc.h | 1 +
2 files changed, 35 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d4e3f9d..3db693f 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
}
EXPORT_SYMBOL(drm_match_cea_mode);
+/**
+ * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
+ * the input VIC from the CEA mode list
+ *
+ * Returns picture aspect ratio
+ */
+enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+{
+ /* return picture aspect ratio for video_code - 1 to access the
+ * right array element
+ */
+ return edid_cea_modes[video_code-1].picture_aspect_ratio;
+}
+EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
+
/*
* Calculate the alternate clock for HDMI modes (those from the HDMI vendor
* specific block).
@@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
frame->video_code = drm_match_cea_mode(mode);
frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
+
+ /* Populate picture aspect ratio from either CEA mode list or
+ * user input
+ */
+ if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
+ mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
+ frame->picture_aspect = mode->picture_aspect_ratio;
+ else if (frame->video_code > 0)
+ frame->picture_aspect = drm_get_cea_aspect_ratio(
+ frame->video_code);
+ else {
+ if (!(mode->vdisplay % 3) &&
+ (((mode->vdisplay * 4) / 3) == mode->hdisplay))
+ frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
+ else if (!(mode->vdisplay % 9) &&
+ (((mode->vdisplay * 16) / 9) == mode->hdisplay))
+ frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
+ }
+
frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 27f828c..50dc55a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
+extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
extern bool drm_detect_hdmi_monitor(struct edid *edid);
extern bool drm_detect_monitor_audio(struct edid *edid);
extern bool drm_rgb_quant_range_selectable(struct edid *edid);
--
1.7.9.5
[View Less]
I thought I'd kick off a thread to better discuss how to deal with
"large" displays which need multiple crtcs/planes merged to deal
without output larger than a certain width.
What I have in mind basically amounts to driver-custom-properties and
shouldn't really need much/anything in the way of drm core or helper
support[1]. There may of course be some room to make helpers/core
more aware of crtc ganging if it turns out to be something that many
drivers are doing in the same way. But to …
[View More]start with my bigger
concern is getting the userspace interface right.
This is semi-related to a thread started earlier by Aaron Plattner on
xorg-devel:
http://lists.freedesktop.org/archives/xorg-devel/2014-January/039984.html
As I see it, there are really two different scenarios:
1) single encoder/connector: double up on planes (pipes) and crtcs
(mixers), but still a single connector.
2) double up entire pipe.. this scenario is more like what Aaron
mentioned. This could mean using multiple DVI or HDMI connectors, or
multiple DSI channels. In the DSI case, I'm not entirely sure yet the
implications for a dsi panel driver, but I think it needs to be a bit
aware.
-------------------
For the first scenario, the approach I am leaning towards is a
'SLAVE_CRTC'[2] property on the crtc. The idea being that userspace
could pick an otherwise unused CRTC, and assign it as a slave in order
to enable higher resolutions. The primary crtc could use the slave's
mixer and primary plane. The existing encoder->possible_crtcs would
be used by userspace to figure out which crtc(s) it could pick to use
as a slave.
The property approach seems like it should fit in nicely with the
plans for atomic. The driver can decide whether a given mode is
possible during the atomic 'test' step based on the proposed
SLAVE_CRTC value. We do possibly get funny edge cases where a CRTC
isn't yet available but will be after next vblank, but this is
basically the same scenario with have already with moving planes
between crtcs (and where an EBUSY or similar return value from atomic
would make sense).
For non-primary planes, it may be sufficient to expose max
width/height dimensions and let userspace figure out when it needs to
use multiple planes for a single layer.
For the second scenario, I am less sure. We could of course also have
some sort of 'SLAVE_CONNECTOR' property (since encoders themselves
don't currently have/need properties). But this probably depends on
the outcome of the xorg/xrandr userspace discussion.
Anyways, I'd of course be interested to hear from others who will have
to tackle the same problem in their own drivers, whether the
'SLAVE_CRTC' approach works for them or not, etc. It looks like the
first scenario is something I'll get to deal with pretty soon now (ie.
approximately as soon as I buy myself a 4k DP monitor ;-))
BR,
-R
[1] assuming it is acceptable for initial modeset for fbcon picking a
lower resolution which can be supported without a slave encoder.
Most/all phones/tablets disable fbcon, so this doesn't seem like it
should be a problem..
[2] if anyone envisions scenarios where we need to gang more than 2
crtcs, we could invert the property, and have 'PRIMARY_CRTC' property
that gets set on each of the slaves.
[View Less]