27 Oct, 2015

1 commit


14 Sep, 2015

1 commit


04 Aug, 2015

2 commits

  • commit 60f207a5b6d8f23c2e8388b415e8d5c7311cc79d upstream.

    for_each_*_in_state validate array index after
    access to array elements, thus perform out of bounds read.

    Fix this by validating index in the first place and read
    array element iff validation was successful.

    Fixes: df63b9994eaf ("drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros")
    Signed-off-by: Andrey Ryabinin
    Signed-off-by: Daniel Vetter
    Signed-off-by: Greg Kroah-Hartman

    Andrey Ryabinin
     
  • commit 6b8eeca65b18ae77e175cc2b6571731f0ee413bf upstream.

    I've only seen this once, and I failed to capture the
    lockdep backtrace, but I did some investigations.

    If we are calling into the MST layer from EDID probing,
    we have the mode_config mutex held, if during that EDID
    probing, the MST hub goes away, then we can get a deadlock
    where the connector destruction function in the driver
    tries to retake the mode config mutex.

    This offloads connector destruction to a workqueue,
    and avoid the subsequenct lock ordering issue.

    Acked-by: Daniel Vetter
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Dave Airlie
     

13 May, 2015

1 commit


16 Apr, 2015

2 commits

  • One more drm-misch pull for 4.1 with mostly simple stuff and boring
    refactoring. Even the cursor fix from Matt is just to make a really anal
    igt happy.

    * tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel:
    drm: fix trivial typo mistake
    drm: Make integer overflow checking cover universal cursor updates (v2)
    drm: make crtc/encoder/connector/plane helper_private a const pointer
    drm/armada: constify struct drm_encoder_helper_funcs pointer
    drm/radeon: constify more struct drm_*_helper funcs pointers
    drm/edid: add #defines for ELD versions
    drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros
    drm: Use kref_put_mutex in drm_gem_object_unreference_unlocked
    drm/drm: constify all struct drm_*_helper funcs pointers
    drm/qxl: constify all struct drm_*_helper funcs pointers
    drm/nouveau: constify all struct drm_*_helper funcs pointers
    drm/radeon: constify all struct drm_*_helper funcs pointers
    drm/gma500: constify all struct drm_*_helper funcs pointers
    drm/mgag200: constify all struct drm_*_helper funcs pointers
    drm/exynos: constify all struct drm_*_helper funcs pointers
    drm: Fix some typos

    Dave Airlie
     
  • This set of patches adjust the setup of the HDMI CTS/N values for audio
    support to be compliant with the work-around given in the iMX6 errata
    documentation as part of the preparation for integrating audio support
    for this driver, and also update the HDMI phy configuration for Rockchip
    devices to improve the HDMI eye pattern.

    * 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    drm: rockchip/dw_hdmi-rockchip: improve for HDMI electrical test
    drm: bridge/dw_hdmi: separate VLEVCTRL settting into platform driver
    drm: bridge/dw_hdmi: fixed codec style
    drm: bridge/dw_hdmi: adjust n/cts setting order
    drm: bridge/dw_hdmi: protect n/cts setting with a mutex
    drm: bridge/dw_hdmi: combine hdmi_set_clock_regenerator_n() and hdmi_regenerate_cts()

    Conflicts:
    drivers/gpu/drm/imx/dw_hdmi-imx.c

    Dave Airlie
     

14 Apr, 2015

1 commit


13 Apr, 2015

2 commits

  • They're only used to store const pointers anyway. This helps to keep
    Ville and the compiler happy.

    Signed-off-by: Jani Nikula
    Reviewed-by: Christian König
    Signed-off-by: Daniel Vetter

    Jani Nikula
     
  • Add ELD versions according to HDA Specification v1.0a.

    2 indicates version 2, which supports CEA_Ver 861D or below. Maximum
    Baseline ELD size of 80 bytes (15 SAD count).

    31 indicates an ELD that has been partially populated through
    implementation specific mean of default programming before an external
    graphics driver is loaded. Only the field that is called out as "canned"
    field will be populated, and audio driver should ignore the non "canned"
    field.

    Signed-off-by: Jani Nikula
    Reviewed-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter

    Jani Nikula
     

12 Apr, 2015

1 commit


08 Apr, 2015

3 commits

  • drm/panel: Changes for v4.1-rc1

    This set of changes adds support for a whole bunch of new panels, mostly
    simple ones. There's now also support for panels to provide display
    timings rather than fixed modes, which should allow panels to work with
    a larger number of display drivers. Eventually drivers should migrate to
    this new interface and the fixed modes removed from panels.

    There are also a couple of sparse fixes for the PS8622 and PS8625 bridge
    drivers.

    * tag 'drm/panel/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux:
    drm/panel: Add support for Ampire AM-800480R3TMQW-A1H 800x480 7" panel
    of: Add vendor prefix for Ampire Co., Ltd.
    drm/panel: Add display timing for HannStar HSD070PWW1
    drm/panel: simple: Add display timing support
    drm/panel: Add display timing support
    drm/panel: Add support for OrtusTech COM43H4M85ULC panel
    of: Add vendor prefix for Ortus Technology Co., Ltd.
    drm/panel: Add bus format for Giantplus GPG482739QS5 panel
    drm/panel: simple: Add support for AUO b101ean01 panel
    drm/panel: simple: Add support for Innolux ZJ070NA-01P
    drm/panel: simple: Add support for Innolux AT043TN24
    drm/panel: simple: Add support for Shelly SCA07010-BFN-LNN
    drm/panel: simple: Add support for Samsung LTN140AT29 panel
    drm: Remove unused DRM_MODE_OBJECT_BRIDGE
    drm/bridge: ptn3460: Fix sparse warnings
    drm/bridge: ps8622: Fix sparse warnings
    drm/bridge: Add I2C based driver for ps8622/ps8625 bridge

    Dave Airlie
     
  • drm/tegra: Changes for v4.1-rc1

    Perhaps the most noteworthy change in this set is the implementation of
    a hardware VBLANK counter using host1x syncpoints. The SOR registers can
    now be dumped via debugfs, which can be useful while debugging. The IOVA
    address space maintained by the driver can also be dumped via debugfs.

    Other than than, these changes are mostly cleanup work, such as making
    register names more consistent or removing unused code (that was left
    over after the atomic mode-setting conversion). There's also a fix for
    eDP that makes the driver cope with firmware that already initialized
    the display (such as the firmware on the Tegra-based Chromebooks).

    * tag 'drm/tegra/for-4.1-rc1' of git://anongit.freedesktop.org/tegra/linux:
    drm/tegra: sor: Reset during initialization
    drm/tegra: gem: Return 64-bit offset for mmap(2)
    drm/tegra: hdmi: Name register fields consistently
    drm/tegra: hdmi: Resets are synchronous
    drm/tegra: dc: Document tegra_dc_state_setup_clock()
    drm/tegra: dc: Remove unused callbacks
    drm/tegra: dc: Remove unused function
    drm/tegra: dc: Use base atomic state helpers
    drm/atomic: Add helpers for state-subclassing drivers
    drm/tegra: dc: Implement hardware VBLANK counter
    gpu: host1x: Export host1x_syncpt_read()
    drm/tegra: sor: Dump registers via debugfs
    drm/tegra: sor: Registers are 32-bit
    drm/tegra: Provide debugfs file for the IOVA space
    drm/tegra: dc: Check for valid parent clock

    Dave Airlie
     
  • If kref_put_mutex returns true then the caller or the put function is responsible
    for unlocking the mutex. The usual pattern assumes that the free
    callback unlocks the mutex, but since that is shared with the locked
    variant we need to explicitly unlock here.

    Signed-off-by: Maarten Lankhorst
    Signed-off-by: Daniel Vetter

    Maarten Lankhorst
     

03 Apr, 2015

2 commits

  • Many panel data sheets, additionally to typical values, list allowed
    ranges for timings such as hsync/vsync lengths, porches, and the pixel
    clock rate. These can be stored in a struct display_timing, to be used
    by an encoder mode_fixup callback to clamp user provided timing values
    or to validate workarounds for clock source limitations.

    This patch adds a new drm_panel_funcs callback that returns the panel's
    available display_timing entries.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Thierry Reding

    Philipp Zabel
     
  • Drivers that subclass CRTC, plane or connector state need to carefully
    duplicate the code that the atomic helpers have. This is bound to cause
    breakage eventually because it requires auditing all drivers and update
    them when code is added to the helpers.

    In order to avoid that, implement new helpers that perform the required
    steps when copying and destroying state. These new helpers are exported
    so that state-subclassing drivers can use them. The default helpers are
    implemented using them as well, providing a single location that needs
    to be changed when adding to base atomic states.

    Reviewed-by: Daniel Vetter
    Reviewed-by: Eric Anholt
    Signed-off-by: Thierry Reding

    Thierry Reding
     

01 Apr, 2015

2 commits

  • Because of iMX6 & Rockchip have differnet mpll config parameter,
    the VLEVCTRL parameter would be different. In this case we should
    separate VLEVCTRL setting from the common dw_hdmi driver, config
    this parameter in platform driver(dw_hdmi-imx and dw_hdmi-rockchip)

    Signed-off-by: Yakir Yang
    Signed-off-by: Russell King

    Yakir Yang
     
  • Final drm-misc pull for 4.0, just various things all over, including a few
    more important atomic fixes. btw I didn't pick up the vmwgfx patch from
    Ville's series, but one patch has one hunk touching vmwgfx and
    Thomas/Jakob didn't get around to ack it. I figured it's simple enough to
    be ok though.

    * tag 'topic/drm-misc-2015-03-31' of git://anongit.freedesktop.org/drm-intel:
    drm: line wrap DRM_IOCTL_DEF* macros
    drm/atomic: Don't try to free a NULL state
    drm/atomic: Clear crtcs, connectors and planes when clearing state
    drm: Rewrite drm_ioctl_flags() to resemble the new drm_ioctl() code
    drm: Use max() to make the ioctl alloc size code cleaner
    drm: Simplify core vs. drv ioctl handling
    drm: Drop ioctl->cmd_drv
    drm: Fix DRM_IOCTL_DEF_DRV()
    drm/atomic-helpers: Properly avoid full modeset dance
    drm: atomic: Allow setting CRTC active property
    drm: atomic: Expose CRTC active property
    drm: crtc_helper: Update hwmode before mode_set call
    drm: mode: Allow NULL modes for equality check
    drm: fb_helper: Simplify exit condition
    drm: mode: Fix typo in kerneldoc
    drm/dp: Print the number of bytes processed for aux nacks

    Dave Airlie
     

31 Mar, 2015

1 commit


27 Mar, 2015

2 commits

  • ioctl->cmd_drv is pointless and we can just as well stick the full ioctl
    definition into ioctl->cmd.

    Cc: Jakob Bornecrantz
    Cc: Thomas Hellstrom
    Signed-off-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter

    Ville Syrjälä
     
  • Currently DRM_IOCTL_DEF_DRV does '[DRM_IOCTL_NR(DRM_##ioctl)]' which
    doesn't make much sense since DRM_##ioctl is already a the raw ioctl
    number. So change it to 'DRM_IOCTL_NR(DRM_IOCTL_##ioctl) - DRM_COMMAND_BASE'
    which means the DRM_IOCTL_NR() now makes sense, and also this also means
    if there's a mistake in the DRM_IOCTL_##ioctl macros we might get a
    warning about it (eg. we would have gotten a sparse warning about the
    i915 colorkey get/set ioctl being defined to be the same thing).

    Signed-off-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter

    Ville Syrjälä
     

24 Mar, 2015

2 commits

  • With bridges now moving to a separate registry they are no longer DRM
    objects, hence this define is no longer needed.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • drm-intel-next-2015-03-13-rebased:
    - EU count report param for gen9+ (Jeff McGee)
    - piles of pll/wm/... fixes for chv, finally out of preliminary hw support
    (Ville, Vijay)
    - gen9 rps support from Akash
    - more work to move towards atomic from Matt, Ander and others
    - runtime pm support for skl (Damien)
    - edp1.4 intermediate link clock support (Sonika)
    - use frontbuffer tracking for fbc (Paulo)
    - remove ilk rc6 (John Harrison)
    - a bunch of smaller things and fixes all over

    Includes backmerge because git rerere couldn't keep up any more.

    * tag 'drm-intel-next-2015-03-13-merge' of git://anongit.freedesktop.org/drm-intel: (366 commits)
    drm/i915: Make sure the primary plane is enabled before reading out the fb state
    drm/i915: Update DRIVER_DATE to 20150313
    drm/i915: Fix vmap_batch page iterator overrun
    drm/i915: Export total subslice and EU counts
    drm/i915: redefine WARN_ON_ONCE to include the condition
    drm/i915/skl: Implement WaDisableHBR2
    drm/i915: Remove the preliminary_hw_support shackles from CHV
    drm/i915: Read CHV_PLL_DW8 from the correct offset
    drm/i915: Rewrite IVB FDI bifurcation conflict checks
    drm/i915: Rewrite some some of the FDI lane checks
    drm/i915/skl: Enable the RPS interrupts programming
    drm/i915/skl: Enabling processing of Turbo interrupts
    drm/i915/skl: Updated the i915_frequency_info debugfs function
    drm/i915: Simplify the way BC bifurcation state consistency is kept
    drm/i915/skl: Updated the act_freq_mhz_show sysfs function
    drm/i915/skl: Updated the gen9_enable_rps function
    drm/i915/skl: Updated the gen6_rps_limits function
    drm/i915/skl: Restructured the gen6_set_rps_thresholds function
    drm/i915/skl: Updated the gen6_set_rps function
    drm/i915/skl: Updated the gen6_init_rps_frequencies function
    ...

    Dave Airlie
     

20 Mar, 2015

1 commit


18 Mar, 2015

1 commit


12 Mar, 2015

3 commits

  • Signed-off-by: Rob Clark
    Reviewed-by: Alex Deucher
    Acked-by: Laurent Pinchart
    Signed-off-by: Daniel Vetter

    Rob Clark
     
  • There has been some confusion about this struct. Lack of documentation
    probably didn't help.

    Signed-off-by: Rob Clark
    Reviewed-by: Alex Deucher
    Acked-by: Laurent Pinchart
    Signed-off-by: Daniel Vetter

    Rob Clark
     
  • Older DisplayPort to DVI-D Dual Link adapters designed by Bizlink have bugs
    in their I2C over AUX implementation (fixed in newer revisions). They work
    fine with Windows, but fail with Linux.

    It turns out that they cannot keep an I2C transaction open unless the
    previous read was 16 bytes; shorter reads can only be followed by a zero
    byte transfer ending the I2C transaction.

    Copy Windows's behaviour, and read 16 bytes at a time. If we get a short
    reply, assume that there's a hardware bottleneck, and shrink our read size
    to match. For this purpose, use the algorithm in the DisplayPort 1.2 spec,
    in the hopes that it'll be closest to what Windows does.

    Also provide an unsafe module parameter for testing smaller transfer sizes,
    in case there are sinks out there that cannot work with Windows.

    Note also that despite the previous comment in drm_dp_i2c_xfer, this speeds
    up native DP EDID reads; Ville Syrjälä found
    the following changes in his testing:

    Device under test: old -> with this patch
    DP->DVI (OUI 001cf8): 40ms -> 35ms
    DP->VGA (OUI 0022b9): 45ms -> 38ms
    Zotac DP->2xHDMI: 25ms -> 4ms
    Asus PB278 monitor: 22ms -> 3ms

    A back of the envelope calculation shows that peak theoretical transfer rate
    for 1 byte reads is around 60 kbit/s; with 16 byte reads, this increases to
    around 500 kbit/s, which explains the increase in speed.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55228
    Tested-by: Aidan Marks (v3)
    Signed-off-by: Simon Farnsworth
    Reviewed-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter

    Simon Farnsworth
     

10 Mar, 2015

7 commits


09 Mar, 2015

2 commits

  • Linux 4.0-rc3 backmerge to fix two i915 conflicts, and get
    some mainline bug fixes needed for my testing box

    Conflicts:
    drivers/gpu/drm/i915/i915_drv.h
    drivers/gpu/drm/i915/intel_display.c

    Dave Airlie
     
  • - Y tiling support for scanout from Tvrtko&Damien
    - Remove more UMS support
    - some small prep patches for OLR removal from John Harrison
    - first few patches for dynamic pagetable allocation from Ben Widawsky, rebased
    by tons of other people
    - DRRS support patches (Sonika&Vandana)
    - fbc patches from Paulo
    - make sure our vblank callbacks aren't called when the pipes are off
    - various patches all over

    * tag 'drm-intel-next-2015-02-27' of git://anongit.freedesktop.org/drm-intel: (61 commits)
    drm/i915: Update DRIVER_DATE to 20150227
    drm/i915: Clarify obj->map_and_fenceable
    drm/i915/skl: Allow Y (and Yf) frame buffer creation
    drm/i915/skl: Update watermarks for Y tiling
    drm/i915/skl: Updated watermark programming
    drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling
    drm/i915/skl: Teach pin_and_fence_fb_obj() about Y tiling constraints
    drm/i915/skl: Adjust intel_fb_align_height() for Yb/Yf tiling
    drm/i915/skl: Allow scanning out Y and Yf fbs
    drm/i915/skl: Add new displayable tiling formats
    drm/i915: Remove DRIVER_MODESET checks from modeset code
    drm/i915: Remove regfile code&data for UMS suspend/resume
    drm/i915: Remove DRIVER_MODESET checks from gem code
    drm/i915: Remove DRIVER_MODESET checks in the gpu reset code
    drm/i915: Remove DRIVER_MODESET checks from suspend/resume code
    drm/i915: Remove DRIVER_MODESET checks in load/unload/close code
    drm/i915: fix a printk format
    drm/i915: Add media rc6 residency file to sysfs
    drm/i915: Add missing description to parameter in alloc_pt_range
    drm/i915: Removed the read of RP_STATE_CAP from sysfs/debugfs functions
    ...

    Dave Airlie
     

05 Mar, 2015

3 commits

  • Use cases like rotation require these hooks to have some context so they
    know how to prepare and cleanup the frame buffer correctly.

    For i915 specifically, object backing pages need to be mapped differently
    for different rotation modes and the driver needs to know which mapping to
    instantiate and which to tear down when transitioning between them.

    v2: Made passed in states const. (Daniel Vetter)

    [airlied: add mdp5 and atmel fixups]
    Signed-off-by: Tvrtko Ursulin
    Cc: Daniel Vetter
    Cc: dri-devel@lists.freedesktop.org
    Reviewed-by: Rob Clark
    Signed-off-by: Dave Airlie

    Tvrtko Ursulin
     
  • - use the atomic helpers for plane_upate/disable hooks (Matt Roper)
    - refactor the initial plane config code (Damien)
    - ppgtt prep patches for dynamic pagetable alloc (Ben Widawsky, reworked and
    rebased by a lot of other people)
    - framebuffer modifier support from Tvrtko Ursulin, drm core code from Rob Clark
    - piles of workaround patches for skl from Damien and Nick Hoath
    - vGPU support for xengt on the client side (Yu Zhang)
    - and the usual smaller things all over

    * tag 'drm-intel-next-2015-02-14' of git://anongit.freedesktop.org/drm-intel: (88 commits)
    drm/i915: Update DRIVER_DATE to 20150214
    drm/i915: Remove references to previously removed UMS config option
    drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5
    drm/i915/skl: Fix always true comparison in a revision id check
    drm/i915/skl: Implement WaEnableLbsSlaRetryTimerDecrement
    drm/i915/skl: Implement WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken
    drm/i915: Add process identifier to requests
    drm/i915/skl: Implement WaBarrierPerformanceFixDisable
    drm/i915/skl: Implement WaCcsTlbPrefetchDisable:skl
    drm/i915/skl: Implement WaDisableChickenBitTSGBarrierAckForFFSliceCS
    drm/i915/skl: Implement WaDisableHDCInvalidation
    drm/i915/skl: Implement WaDisableLSQCROPERFforOCL
    drm/i915/skl: Implement WaDisablePartialResolveInVc
    drm/i915/skl: Introduce a SKL specific init_workarounds()
    drm/i915/skl: Document that we implement WaRsClearFWBitsAtReset
    drm/i915/skl: Implement WaSetGAPSunitClckGateDisable
    drm/i915/skl: Make the init clock gating function skylake specific
    drm/i915/skl: Provide a gen9 specific init_render_ring()
    drm/i915/skl: Document the WM read latency W/A with its name
    drm/i915/skl: Also detect eDRAM on SKL
    ...

    Dave Airlie
     
  • We need to store device offsets in 64 bit as the device
    address space may be larger than the CPU's.

    Fixes GPU init failures on radeons with 4GB or more of
    vram on 32 bit kernels. We put vram at the start of the
    GPU's address space so the gart aperture starts at 4 GB
    causing all GPU addresses in the gart aperture to get
    truncated.

    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=89072

    [airlied: fix warning on nouveau build]

    Signed-off-by: Alex Deucher
    Cc: thellstrom@vmware.com
    Acked-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Alex Deucher