1. 06 Mar, 2015 2 commits
  2. 04 Mar, 2015 13 commits
  3. 03 Mar, 2015 22 commits
    • Alex Deucher's avatar
      drm/radeon: fix interlaced modes on DCE8 · 77ae5f4b
      Alex Deucher authored
      Need to double the viewport height.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      77ae5f4b
    • Tommi Rantala's avatar
      drm/radeon: fix DRM_IOCTL_RADEON_CS oops · a28b2a47
      Tommi Rantala authored
      Passing zeroed drm_radeon_cs struct to DRM_IOCTL_RADEON_CS produces the
      following oops.
      
      Fix by always calling INIT_LIST_HEAD() to avoid the crash in list_sort().
      
      ----------------------------------
      
       #include <stdint.h>
       #include <fcntl.h>
       #include <unistd.h>
       #include <sys/ioctl.h>
       #include <drm/radeon_drm.h>
      
       static const struct drm_radeon_cs cs;
      
       int main(int argc, char **argv)
       {
               return ioctl(open(argv[1], O_RDWR), DRM_IOCTL_RADEON_CS, &cs);
       }
      
      ----------------------------------
      
      [ttrantal@test2 ~]$ ./main /dev/dri/card0
      [   46.904650] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [   46.905022] IP: [<ffffffff814d6df2>] list_sort+0x42/0x240
      [   46.905022] PGD 68f29067 PUD 688b5067 PMD 0
      [   46.905022] Oops: 0002 [#1] SMP
      [   46.905022] CPU: 0 PID: 2413 Comm: main Not tainted 4.0.0-rc1+ #58
      [   46.905022] Hardware name: Hewlett-Packard HP Compaq dc5750 Small Form Factor/0A64h, BIOS 786E3 v02.10 01/25/2007
      [   46.905022] task: ffff880058e2bcc0 ti: ffff880058e64000 task.ti: ffff880058e64000
      [   46.905022] RIP: 0010:[<ffffffff814d6df2>]  [<ffffffff814d6df2>] list_sort+0x42/0x240
      [   46.905022] RSP: 0018:ffff880058e67998  EFLAGS: 00010246
      [   46.905022] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      [   46.905022] RDX: ffffffff81644410 RSI: ffff880058e67b40 RDI: ffff880058e67a58
      [   46.905022] RBP: ffff880058e67a88 R08: 0000000000000000 R09: 0000000000000000
      [   46.905022] R10: ffff880058e2bcc0 R11: ffffffff828e6ca0 R12: ffffffff81644410
      [   46.905022] R13: ffff8800694b8018 R14: 0000000000000000 R15: ffff880058e679b0
      [   46.905022] FS:  00007fdc65a65700(0000) GS:ffff88006d600000(0000) knlGS:0000000000000000
      [   46.905022] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   46.905022] CR2: 0000000000000000 CR3: 0000000058dd9000 CR4: 00000000000006f0
      [   46.905022] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   46.905022] DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400
      [   46.905022] Stack:
      [   46.905022]  ffff880058e67b40 ffff880058e2bcc0 ffff880058e67a78 0000000000000000
      [   46.905022]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [   46.905022]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [   46.905022] Call Trace:
      [   46.905022]  [<ffffffff81644a65>] radeon_cs_parser_fini+0x195/0x220
      [   46.905022]  [<ffffffff81645069>] radeon_cs_ioctl+0xa9/0x960
      [   46.905022]  [<ffffffff815e1f7c>] drm_ioctl+0x19c/0x640
      [   46.905022]  [<ffffffff810f8fdd>] ? trace_hardirqs_on_caller+0xfd/0x1c0
      [   46.905022]  [<ffffffff810f90ad>] ? trace_hardirqs_on+0xd/0x10
      [   46.905022]  [<ffffffff8160c066>] radeon_drm_ioctl+0x46/0x80
      [   46.905022]  [<ffffffff81211868>] do_vfs_ioctl+0x318/0x570
      [   46.905022]  [<ffffffff81462ef6>] ? selinux_file_ioctl+0x56/0x110
      [   46.905022]  [<ffffffff81211b41>] SyS_ioctl+0x81/0xa0
      [   46.905022]  [<ffffffff81dc6312>] system_call_fastpath+0x12/0x17
      [   46.905022] Code: 48 89 b5 10 ff ff ff 0f 84 03 01 00 00 4c 8d bd 28 ff ff
      ff 31 c0 48 89 fb b9 15 00 00 00 49 89 d4 4c 89 ff f3 48 ab 48 8b 46 08 <48> c7
      00 00 00 00 00 48 8b 0e 48 85 c9 0f 84 7d 00 00 00 c7 85
      [   46.905022] RIP  [<ffffffff814d6df2>] list_sort+0x42/0x240
      [   46.905022]  RSP <ffff880058e67998>
      [   46.905022] CR2: 0000000000000000
      [   47.149253] ---[ end trace 09576b4e8b2c20b8 ]---
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarTommi Rantala <tt.rantala@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      a28b2a47
    • Alex Deucher's avatar
      drm/radeon: do a posting read in cik_set_irq · cffefd9b
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      cffefd9b
    • Alex Deucher's avatar
      drm/radeon: do a posting read in si_set_irq · 0586915e
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      0586915e
    • Alex Deucher's avatar
      drm/radeon: do a posting read in evergreen_set_irq · c320bb5f
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      c320bb5f
    • Alex Deucher's avatar
      drm/radeon: do a posting read in r600_set_irq · 9d1393f2
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      9d1393f2
    • Alex Deucher's avatar
      drm/radeon: do a posting read in rs600_set_irq · 54acf107
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      54acf107
    • Alex Deucher's avatar
      drm/radeon: do a posting read in r100_set_irq · f957063f
      Alex Deucher authored
      To make sure the writes go through the pci bridge.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=90741Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f957063f
    • Slava Grigorev's avatar
      radeon/audio: fix DP audio on DCE6 · 2afa3265
      Slava Grigorev authored
      Split DCE6 and DCE8 programming of DCCG_AUDIO_DTO1
      registers to properly enable DP audio for both DCE
      revisions.
      Signed-off-by: default avatarSlava Grigorev <slava.grigorev@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      2afa3265
    • Slava Grigorev's avatar
      radeon/audio: fix whitespace · b983a8f4
      Slava Grigorev authored
      Use proper tabs.
      Signed-off-by: default avatarSlava Grigorev <slava.grigorev@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      b983a8f4
    • Alex Deucher's avatar
      drm/radeon: adjust audio callback order · 5c046a57
      Alex Deucher authored
      - Move it out of the UNIPHY case to handle older DCE blocks.
      - set audio dpms before video dpms
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5c046a57
    • Alex Deucher's avatar
      drm/radeon: properly set dto for dp on DCE4/5 · aeefd07e
      Alex Deucher authored
      If DCPLL or ext PLL is used, use the disp clk.  If
      PPLL is used, use the dp clock.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      aeefd07e
    • Alex Deucher's avatar
      drm/radeon/audio: update EDID derived fields in modeset · b20932dd
      Alex Deucher authored
      We don't necessarily have an EDID at this point when
      audio detect gets called.  Ideally we'd update these
      fields in detect, but that requires a larger rework
      of the display detect code.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      b20932dd
    • Alex Deucher's avatar
      drm/radeon: don't toggle audio state in modeset · 3ed7ceea
      Alex Deucher authored
      Should be done only at detect time to avoid spurious
      state changes on the audio side.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3ed7ceea
    • Alex Deucher's avatar
      drm/radeon/audio: set mute around state setup · 88af339f
      Alex Deucher authored
      To avoid possible sound artifacts while setting up audio.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      88af339f
    • Alex Deucher's avatar
      drm/radeon: assign pin in detect · d3c34d2c
      Alex Deucher authored
      We need the pin from detect on, it's too late in dpms.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d3c34d2c
    • Alex Deucher's avatar
      drm/radeon: fix the audio dpms callbacks · add7d759
      Alex Deucher authored
      Don't touch the audio enable bits as these are already
      handled in display detection.  Enable the hdmi secondary
      streams in hdmi enable to match dp.  Rename dp dpms
      callback to be consistent with hdmi.
      
      bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=89327
      https://bugzilla.kernel.org/show_bug.cgi?id=93921Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      add7d759
    • Linus Torvalds's avatar
      Linux 4.0-rc2 · 13a7a6ac
      Linus Torvalds authored
      13a7a6ac
    • Daniel Vetter's avatar
      drm/i915: Fix modeset state confusion in the load detect code · 9128b040
      Daniel Vetter authored
      This is a tricky story of the new atomic state handling and the legacy
      code fighting over each another. The bug at hand is an underrun of the
      framebuffer reference with subsequent hilarity caused by the load
      detect code. Which is peculiar since the the exact same code works
      fine as the implementation of the legacy setcrtc ioctl.
      
      Let's look at the ingredients:
      
      - Currently our code is a crazy mix of legacy modeset interfaces to
        set the parameters and half-baked atomic state tracking underneath.
        While this transition is going we're using the transitional plane
        helpers to update the atomic side (drm_plane_helper_disable/update
        and friends), i.e. plane->state->fb. Since the state structure owns
        the fb those functions take care of that themselves.
      
        The legacy state (specifically crtc->primary->fb) is still managed
        by the old code (and mostly by the drm core), with the fb reference
        counting done by callers (core drm for the ioctl or the i915 load
        detect code). The relevant commit is
      
        commit ea2c67bb
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Dec 23 10:41:52 2014 -0800
      
            drm/i915: Move to atomic plane helpers (v9)
      
      - drm_plane_helper_disable has special code to handle multiple calls
        in a row - it checks plane->crtc == NULL and bails out. This is to
        match the proper atomic implementation which needs the crtc to get
        at the implied locking context atomic updates always need. See
      
        commit acf24a39
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Tue Jul 29 15:33:05 2014 +0200
      
            drm/plane-helper: transitional atomic plane helpers
      
      - The universal plane code split out the implicit primary plane from
        the CRTC into it's own full-blown drm_plane object. As part of that
        the setcrtc ioctl (which updated both the crtc mode and primary
        plane) learned to set crtc->primary->crtc on modeset to make sure
        the plane->crtc assignments statate up to date in
      
        commit e13161af
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Apr 1 15:22:38 2014 -0700
      
            drm: Add drm_crtc_init_with_planes() (v2)
      
        Unfortunately we've forgotten to update the load detect code. Which
        wasn't a problem since the load detect modeset is temporary and
        always undone before we drop the locks.
      
      - Finally there is a organically grown history (i.e. don't ask) around
        who sets the legacy plane->fb for the various driver entry points.
        Originally updating that was the drivers duty, but for almost all
        places we've moved that (plus updating the refcounts) into the core.
        Again the exception is the load detect code.
      
      Taking all together the following happens:
      - The load detect code doesn't set crtc->primary->crtc. This is only
        really an issue on crtcs never before used or when userspace
        explicitly disabled the primary plane.
      
      - The plane helper glue code short-circuits because of that and leaves
        a non-NULL fb behind in plane->state->fb and plane->fb. The state
        fb isn't a real problem (it's properly refcounted on its own), it's
        just the canary.
      
      - Load detect code drops the reference for that fb, but doesn't set
        plane->fb = NULL. This is ok since it's still living in that old
        world where drivers had to clear the pointer but the core/callers
        handled the refcounting.
      
      - On the next modeset the drm core notices plane->fb and takes care of
        refcounting it properly by doing another unref. This drops the
        refcount to zero, leaving state->plane now pointing at freed memory.
      
      - intel_plane_duplicate_state still assume it owns a reference to that
        very state->fb and bad things start to happen.
      
      Fix this all by applying the same duct-tape as for the legacy setcrtc
      ioctl code and set crtc->primary->crtc properly.
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reported-and-tested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9128b040
    • Dave Airlie's avatar
      Revert "drm/rockchip: Flip select/depends in Kconfig" · ed9ed50c
      Dave Airlie authored
      This reverts commit 9c58e8db.
      
      This doesn't seem to fully fix this, Kbuild who knows.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      ed9ed50c
    • Daniel Vetter's avatar
      drm/rockchip: Flip select/depends in Kconfig · 9c58e8db
      Daniel Vetter authored
      Otherwise Kconfig gets confused and somehow ends up creating a 2nd drm
      submenu. I couldn't find i915 because of this any more at first.
      
      Cc: Andy Yan <andy.yan@rock-chips.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
      Cc: linux-kbuild@vger.kernel.or
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@gmail.com>
      9c58e8db
    • Dave Airlie's avatar
      Merge tag 'imx-drm-fixes-2015-02-24' of git://git.pengutronix.de/git/pza/linux into drm-fixes · 9d0685ae
      Dave Airlie authored
      imx-drm fixes for mode fixup, dw_hdmi/imx, and parallel-display
      
      - A clock fix for too large pixel clocks depending on the
        DI clock flag simplification patch
      - Pruning of unsupported modes and a missing end of array element
        for dw_hdmi-imx
      - LVDS modeset fix for mode fixup
      - Fix parallel-display deferred probing if drm_panel is used
      
      * tag 'imx-drm-fixes-2015-02-24' of git://git.pengutronix.de/git/pza/linux:
        DRM: i.MX: parallel display: Support probe deferral for finding DRM panel
        drm/imx: imx-ldb: enable DI clock in encoder_mode_set
        drm/imx: dw_hdmi-imx: add end of array element to current control array
        drm/imx: dw_hdmi-imx: add mode_valid callback prune unsupported modes
        gpu: ipu-v3: do not divide by zero if the pixel clock is too large
      9d0685ae
  4. 02 Mar, 2015 3 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 023a6007
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Two GPIO fixes:
      
         - Fix a translation problem in of_get_named_gpiod_flags()
      
         - Fix a long standing container_of() mistake in the TPS65912 driver"
      
      * tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: tps65912: fix wrong container_of arguments
        gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node
      023a6007
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-4.0-rc2' of... · 10d6dfc1
      Linus Torvalds authored
      Merge branch 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
      
      Pull thermal management fixes from Eduardo Valentin:
       "Specifics:
      
         - Several fixes in tmon tool.
      
         - Fixes in intel int340x for _ART and _TRT tables.
      
         - Add id for Avoton SoC into powerclamp driver.
      
         - Fixes in RCAR thermal driver to remove race conditions and fix fail
           path
      
         - Fixes in TI thermal driver: removal of unnecessary code and build
           fix if !CONFIG_PM_SLEEP
      
         - Cleanups in exynos thermal driver
      
         - Add stubs for include/linux/thermal.h.  Now drivers using thermal
           calls but that also work without CONFIG_THERMAL will be able to
           compile for systems that don't care about thermal.
      
        Note: I am sending this pull on Rui's behalf while he fixes issues in
        his Linux box"
      
      * 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
        thermal: int340x_thermal: Ignore missing _ART, _TRT tables
        thermal/intel_powerclamp: add id for Avoton SoC
        tools/thermal: tmon: silence 'set but not used' warnings
        tools/thermal: tmon: use pkg-config to determine library dependencies
        tools/thermal: tmon: support cross-compiling
        tools/thermal: tmon: add .gitignore
        tools/thermal: tmon: fixup tui windowing calculations
        tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
        tools/thermal: tmon: add min/max macros
        tools/thermal: tmon: add --target-temp parameter
        thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
        thermal: rcar: Make error and remove paths symmetrical with init
        thermal: rcar: Fix race condition between init and interrupt
        thermal: Introduce dummy functions when thermal is not defined
        ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
        thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP
      10d6dfc1
    • Linus Torvalds's avatar
      Merge tag 'md/4.0-fixes' of git://neil.brown.name/md · 1a6f77ab
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Three md fixes:
      
         - fix a read-balance problem that was reported 2 years ago, but that
           I never noticed the report :-(
      
         - fix for rare RAID6 problem causing incorrect bitmap updates when
           two devices fail.
      
         - add __ATTR_PREALLOC annotation now that it is possible"
      
      * tag 'md/4.0-fixes' of git://neil.brown.name/md:
        md: mark some attributes as pre-alloc
        raid5: check faulty flag for array status during recovery.
        md/raid1: fix read balance when a drive is write-mostly.
      1a6f77ab