Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2145199c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  dma-buf: Documentation update for Kconfig select
  nouveau: Support Optimus models for vga_switcheroo
  nouveau: properly check for _DSM function support
  dma-buf: drop option text so users don't select it.
  radeon: Call pci_clear_master() instead of open-coding it.
  gma500: Discard modes that don't fit in stolen memory
  drm: bump DRM_CONNECTOR_MAX_ENCODER from 2 to 3
  drm/radeon/kms: Fix module parameter description format
  drm/radeon/kms/ni: fix packet2 handling for VM IB parser
  ttm/dma: Remove the WARN() which is not useful.
parents 21ebd6c6 08179456
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -219,6 +219,10 @@ NOTES:
   If the exporter chooses not to allow an attach() operation once a
   map_dma_buf() API has been called, it simply returns an error.

Miscellaneous notes:
- Any exporters or users of the dma-buf buffer sharing framework must have
  a 'select DMA_SHARED_BUFFER' in their respective Kconfigs.

References:
[1] struct dma_buf_ops in include/linux/dma-buf.h
[2] All interfaces mentioned above defined in include/linux/dma-buf.h
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ config GENERIC_CPU_DEVICES
source "drivers/base/regmap/Kconfig"

config DMA_SHARED_BUFFER
	bool "Buffer framework to be shared between drivers"
	bool
	default n
	select ANON_INODES
	depends on EXPERIMENTAL
+6 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode)
static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
				struct drm_display_mode *mode)
{
	struct drm_psb_private *dev_priv = connector->dev->dev_private;
	int max_clock = 0;
	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
		return MODE_NO_DBLESCAN;
@@ -82,6 +83,11 @@ static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
	if (mode->hdisplay > 1680 || mode->vdisplay > 1050)
		return MODE_PANEL;

	/* We assume worst case scenario of 32 bpp here, since we don't know */
	if ((ALIGN(mode->hdisplay * 4, 64) * mode->vdisplay) >
	    dev_priv->vram_stolen_size)
		return MODE_MEM;

	return MODE_OK;
}

+6 −8
Original line number Diff line number Diff line
@@ -241,6 +241,7 @@ static int cdv_hdmi_get_modes(struct drm_connector *connector)
static int cdv_hdmi_mode_valid(struct drm_connector *connector,
				 struct drm_display_mode *mode)
{
	struct drm_psb_private *dev_priv = connector->dev->dev_private;

	if (mode->clock > 165000)
		return MODE_CLOCK_HIGH;
@@ -255,14 +256,11 @@ static int cdv_hdmi_mode_valid(struct drm_connector *connector,
	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
		return MODE_NO_INTERLACE;

	/*
	 * FIXME: for now we limit the size to 1680x1050 on CDV, otherwise it
	 * will go beyond the stolen memory size allocated to the framebuffer
	 */
	if (mode->hdisplay > 1680)
		return MODE_PANEL;
	if (mode->vdisplay > 1050)
		return MODE_PANEL;
	/* We assume worst case scenario of 32 bpp here, since we don't know */
	if ((ALIGN(mode->hdisplay * 4, 64) * mode->vdisplay) >
	    dev_priv->vram_stolen_size)
		return MODE_MEM;

	return MODE_OK;
}

+6 −0
Original line number Diff line number Diff line
@@ -506,6 +506,7 @@ int oaktrail_crtc_hdmi_mode_set(struct drm_crtc *crtc,
static int oaktrail_hdmi_mode_valid(struct drm_connector *connector,
				struct drm_display_mode *mode)
{
	struct drm_psb_private *dev_priv = connector->dev->dev_private;
	if (mode->clock > 165000)
		return MODE_CLOCK_HIGH;
	if (mode->clock < 20000)
@@ -514,6 +515,11 @@ static int oaktrail_hdmi_mode_valid(struct drm_connector *connector,
	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
		return MODE_NO_DBLESCAN;

	/* We assume worst case scenario of 32 bpp here, since we don't know */
	if ((ALIGN(mode->hdisplay * 4, 64) * mode->vdisplay) >
	    dev_priv->vram_stolen_size)
		return MODE_MEM;

	return MODE_OK;
}

Loading