1. 06 Dec, 2017 2 commits
  2. 05 Dec, 2017 28 commits
  3. 04 Dec, 2017 10 commits
    • Hans de Goede's avatar
      fbcon: Remove dmi quirk table · f2f4946b
      Hans de Goede authored
      This is now all handled in the drivers and communicated through
      fb_info.fbcon_rotate_hint.
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-8-hdegoede@redhat.com
      f2f4946b
    • Hans de Goede's avatar
      efifb: Set info->fbcon_rotate_hint based on drm_get_panel_orientation_quirk · 028b186f
      Hans de Goede authored
      On some hardware the LCD panel is not mounted upright in the casing,
      but rotated by 90 degrees. In this case we want the console to
      automatically be rotated to compensate.
      
      The drm subsys has a quirk table for this, use the
      drm_get_panel_orientation_quirk function to get the panel orientation
      and set info->fbcon_rotate_hint based on this, so that the fbcon console
      on top of efifb gets automatically rotated to compensate for the panel
      orientation.
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-7-hdegoede@redhat.com
      028b186f
    • Hans de Goede's avatar
      drm/i915: Add "panel orientation" property to the panel connector, v6. · 82daca29
      Hans de Goede authored
      Ideally we could use the VBT for this, that would be simple, in
      intel_dsi_init() check dev_priv->vbt.dsi.config->rotation, set
      connector->display_info.panel_orientation accordingly and call
      drm_connector_init_panel_orientation_property(), done.
      
      Unfortunately vbt.dsi.config->rotation is always 0 even on tablets
      with an upside down LCD and where the GOP is properly rotating the
      EFI fb in hardware.
      
      So instead we end up reading the rotation from the primary plane.
      
      This commit only implements the panel orientation property for DSI
      panels on BYT / CHT hardware, as all known non normal oriented panels
      sofar are only found on this hardware.
      
      Changes in v2:
      -Read back the rotation applied by the GOP from the primary plane
       instead of relying on dev_priv->vbt.dsi.config->rotation, because it
       seems that the VBT rotation filed is always 0 even on devices where the
       GOP does apply a rotation
      
      Changes in v3:
      -Rewrite the code to read back the orientation from the primary
       plane to contain all of this in intel_dsi.c instead of poking a bunch
       of holes between all the different layers
      
      Changes in v6:
      -Move hardware readout to intel_dsi_init()
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-6-hdegoede@redhat.com
      82daca29
    • Hans de Goede's avatar
      drm/fb-helper: Apply panel orientation connector prop to the primary plane, v6. · 8f0cb418
      Hans de Goede authored
      Apply the "panel orientation" drm connector prop to the primary plane so
      that fbcon and fbdev using userspace programs display the right way up.
      
      Changes in v3:
      -Use a rotation member in struct drm_fb_helper_crtc and set that from
       drm_setup_crtcs instead of looping over all crtc's to find the right one
       later
      -Since we now no longer look at rotation quirks directly in the fbcon
       code, set fb_info.fbcon_rotate_hint when the panel is not mounted upright
       and we cannot use hardware rotation
      
      Changes in v4:
      -Make drm_fb_helper_init() init drm_fb_helper_crtc.rotation to
       DRM_MODE_ROTATE_0 for all crtcs, so that we do not end up setting the
       plane_state's rotation to an invalid value for disabled crtcs
       (caught by Fi.CI)
      
      Changes in v5:
      -Only use hardware (crtc primary plane) rotation for DRM_ROTATE_180,
       90 / 270 degree rotation requires special handling which we lack atm
      -Add a TODO comment for 90 / 270 degree hardware rotation
      -Add some comments to better document the default case when mapping
       sw_rotations to fbcon_rotate_hints
      
      Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94894Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-5-hdegoede@redhat.com
      8f0cb418
    • Hans de Goede's avatar
      drm: Add support for a panel-orientation connector property, v6 · 8d70f395
      Hans de Goede authored
      On some devices the LCD panel is mounted in the casing in such a way that
      the up/top side of the panel does not match with the top side of the
      device (e.g. it is mounted upside-down).
      
      This commit adds the necessary infra for lcd-panel drm_connector-s to
      have a "panel orientation" property to communicate how the panel is
      orientated vs the casing.
      
      Userspace can use this property to check for non-normal orientation and
      then adjust the displayed image accordingly by rotating it to compensate.
      
      Changes in v2:
      -Store panel_orientation in drm_display_info, so that drm_fb_helper.c can
       access it easily
      -Have a single drm_connector_init_panel_orientation_property rather then
       create and attach functions. The caller is expected to set
       drm_display_info.panel_orientation before calling this, then this will
       check for platform specific quirks overriding the panel_orientation and if
       the panel_orientation is set after this then it will attach the property.
      
      Changes in v6:
      -Use an enum (with kerneldoc) rather then #defines for
       DRM_MODE_PANEL_ORIENTATION_*
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-4-hdegoede@redhat.com
      8d70f395
    • Hans de Goede's avatar
      drm: Add panel orientation quirks, v6. · 404d1a3e
      Hans de Goede authored
      Some x86 clamshell design devices use portrait tablet screens and a display
      engine which cannot rotate in hardware, so the firmware just leaves things
      as is and we cannot figure out that the display is oriented non upright
      from the hardware.
      
      So at least on x86, we need a quirk table for this. This commit adds a DMI
      based quirk table which is initially populated with 5 such devices: Asus
      T100HA, GPD Pocket, GPD win, I.T.Works TW891 and the VIOS LTH17.
      
      This quirk table will be used by the drm code to let userspace know that
      the display is not mounted upright inside the devices case through a new
      panel orientation drm-connector property, as well as to tell fbcon to
      rotate the console so that it shows the right way up.
      
      Changes in v5:
      -Add a kernel-doc comment documenting drm_get_panel_orientation_quirk()
      -Remove board_* matches from the dmi-matches for the VIOS LTH17 laptop,
       keeping only the (identical) sys_vendor and product_name matches.
       This is necessary because an older version of the bios has
       board_vendor set to VOIS instead of VIOS
      
      Changes in v6:
      -Add reference to added kernel-docs in Documentation/gpu/drm-kms-helpers.rst
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-3-hdegoede@redhat.com
      404d1a3e
    • Hans de Goede's avatar
      fbcon: Add fbcon_rotate_hint to struct fb_info · c9e6a364
      Hans de Goede authored
      On some hardware the LCD panel is not mounted upright in the casing,
      but upside-down or rotated 90 degrees. In this case we want the console
      to automatically be rotated to compensate.
      
      The fbdev-driver may know about the need to rotate. Add a new
      fbcon_rotate_hint field to struct fb_info, which gets initialized to -1.
      If the fbdev-driver knows that some sort of rotation is necessary then
      it can set this field to a FB_ROTATE_* value to tell the fbcon console
      driver to rotate the console.
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171125193553.23986-2-hdegoede@redhat.com
      c9e6a364
    • Gustavo Padovan's avatar
      Merge arlied/drm-next into drm-misc-next · 7b47c66c
      Gustavo Padovan authored
      We need to pull 66660d4c (drm: add connector info/property for
      non-desktop displays [v2]) into drm-misc-next to continue the development
      of the display rotation series.
      
      Effectively this also pulls 4.15-r2 into drm-misc-next.
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
      7b47c66c
    • Lucas Stach's avatar
      drm/prime: skip CPU sync in map/unmap dma_buf · ca0e68e2
      Lucas Stach authored
      Dma-bufs should already be device coherent, as they are only pulled in the
      CPU domain via the begin/end cpu_access calls. As we cache the mapping set
      up by dma_map_sg a CPU sync at this point will not actually guarantee proper
      coherency on non-coherent architectures, so we can as well stop pretending.
      
      This is an important performance fix for architectures which need explicit
      cache synchronization and userspace doing lots of dma-buf imports.
      Improves Weston on Etnaviv performance 5x, where before this patch > 90%
      of Weston CPU time was spent synchronizing caches for buffers which are
      already device coherent.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171130173428.8666-1-l.stach@pengutronix.de
      ca0e68e2
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2017-11-17-1' of... · ca797d29
      Dave Airlie authored
      Merge tag 'drm-intel-next-2017-11-17-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      More change sets for 4.16:
      
      - Many improvements for selftests and other igt tests (Chris)
      - Forcewake with PUNIT->PMIC bus fixes and robustness (Hans)
      - Define an engine class for uABI (Tvrtko)
      - Context switch fixes and improvements (Chris)
      - GT powersavings and power gating simplification and fixes (Chris)
      - Other general driver clean-ups (Chris, Lucas, Ville)
      - Removing old, useless and/or bad workarounds (Chris, Oscar, Radhakrishna)
      - IPS, pipe config, etc in preparation for another Fast Boot attempt (Maarten)
      - OA perf fixes and support to Coffee Lake and Cannonlake (Lionel)
      - Fixes around GPU fault registers (Michel)
      - GEM Proxy (Tina)
      - Refactor of Geminilake and Cannonlake plane color handling (James)
      - Generalize transcoder loop (Mika Kahola)
      - New HW Workaround for Cannonlake and Geminilake (Rodrigo)
      - Resume GuC before using GEM (Chris)
      - Stolen Memory handling improvements (Ville)
      - Initialize entry in PPAT for older compilers (Chris)
      - Other fixes and robustness improvements on execbuf (Chris)
      - Improve logs of GEM_BUG_ON (Mika Kuoppala)
      - Rework with massive rename of GuC functions and files (Sagar)
      - Don't sanitize frame start delay if pipe is off (Ville)
      - Cannonlake clock fixes (Rodrigo)
      - Cannonlake HDMI 2.0 support (Rodrigo)
      - Add a GuC doorbells selftest (Michel)
      - Add might_sleep() check to our wait_for() (Chris)
      
      Many GVT changes for 4.16:
      
      - CSB HWSP update support (Weinan)
      - GVT debug helpers, dyndbg and debugfs (Chuanxiao, Shuo)
      - full virtualized opregion (Xiaolin)
      - VM health check for sane fallback (Fred)
      - workload submission code refactor for future enabling (Zhi)
      - Updated repo URL in MAINTAINERS (Zhenyu)
      - other many misc fixes
      
      * tag 'drm-intel-next-2017-11-17-1' of git://anongit.freedesktop.org/drm/drm-intel: (260 commits)
        drm/i915: Update DRIVER_DATE to 20171117
        drm/i915: Add a policy note for removing workarounds
        drm/i915/selftests: Report ENOMEM clearly for an allocation failure
        Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk"
        drm/i915: Calculate g4x intermediate watermarks correctly
        drm/i915: Calculate vlv/chv intermediate watermarks correctly, v3.
        drm/i915: Pass crtc_state to ips toggle functions, v2
        drm/i915: Pass idle crtc_state to intel_dp_sink_crc
        drm/i915: Enable FIFO underrun reporting after initial fastset, v4.
        drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM
        drm/i915: Add might_sleep() check to wait_for()
        drm/i915/selftests: Add a GuC doorbells selftest
        drm/i915/cnl: Extend HDMI 2.0 support to CNL.
        drm/i915/cnl: Simplify dco_fraction calculation.
        drm/i915/cnl: Don't blindly replace qdiv.
        drm/i915/cnl: Fix wrpll math for higher freqs.
        drm/i915/cnl: Fix, simplify and unify wrpll variable sizes.
        drm/i915/cnl: Remove useless conversion.
        drm/i915/cnl: Remove spurious central_freq.
        drm/i915/selftests: exercise_ggtt may have nothing to do
        ...
      ca797d29