1. 16 8月, 2016 5 次提交
  2. 15 8月, 2016 1 次提交
  3. 12 8月, 2016 6 次提交
  4. 11 8月, 2016 5 次提交
  5. 10 8月, 2016 2 次提交
  6. 09 8月, 2016 21 次提交
    • B
      drm/cirrus: Fix NULL pointer dereference when registering the fbdev · 36e9d08b
      Boris Brezillon 提交于
      cirrus_modeset_init() is initializing/registering the emulated fbdev
      and, since commit c61b93fe ("drm/atomic: Fix remaining places where
      !funcs->best_encoder is valid"), DRM internals can access/test some of
      the fields in mode_config->funcs as part of the fbdev registration
      process.
      Make sure dev->mode_config.funcs is properly set to avoid dereferencing
      a NULL pointer.
      Reported-by: NMike Marshall <hubcap@omnibond.com>
      Reported-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Fixes: c61b93fe ("drm/atomic: Fix remaining places where !funcs->best_encoder is valid")
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      36e9d08b
    • M
      drm/edid: Set 8 bpc color depth for displays with "DFP 1.x compliant TMDS". · 210a021d
      Mario Kleiner 提交于
      According to E-EDID spec 1.3, table 3.9, a digital video sink with the
      "DFP 1.x compliant TMDS" bit set is "signal compatible with VESA DFP 1.x
      TMDS CRGB, 1 pixel / clock, up to 8 bits / color MSB aligned".
      
      For such displays, the DFP spec 1.0, section 3.10 "EDID support" says:
      
      "If the DFP monitor only supports EDID 1.X (1.1, 1.2, etc.)
       without extensions, the host will make the following assumptions:
      
       1. 24-bit MSB-aligned RGB TFT
       2. DE polarity is active high
       3. H and V syncs are active high
       4. Established CRT timings will be used
       5. Dithering will not be enabled on the host"
      
      So if we don't know the bit depth of the display from additional
      colorimetry info we should assume 8 bpc / 24 bpp by default.
      
      This patch adds info->bpc = 8 assignement for that case.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      210a021d
    • M
      drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capability is unknown" · 196f954e
      Mario Kleiner 提交于
      This reverts commit 013dd9e0
      ("drm/i915/dp: fall back to 18 bpp when sink capability is unknown")
      
      This commit introduced a regression into stable kernels,
      as it reduces output color depth to 6 bpc for any video
      sink connected to a Displayport connector if that sink
      doesn't report a specific color depth via EDID, or if
      our EDID parser doesn't actually recognize the proper
      bpc from EDID.
      
      Affected are active DisplayPort->VGA converters and
      active DisplayPort->DVI converters. Both should be
      able to handle 8 bpc, but are degraded to 6 bpc with
      this patch.
      
      The reverted commit was meant to fix
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=105331
      
      A followup patch implements a fix for that specific bug,
      which is caused by a faulty EDID of the affected DP panel
      by adding a new EDID quirk for that panel.
      
      DP 18 bpp fallback handling and other improvements to
      DP sink bpc detection will be handled for future
      kernels in a separate series of patches.
      
      Please backport to stable.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Cc: stable@vger.kernel.org
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      196f954e
    • M
      drm/edid: Add 6 bpc quirk for display AEO model 0. · e10aec65
      Mario Kleiner 提交于
      Bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=105331
      reports that the "AEO model 0" display is driven with 8 bpc
      without dithering by default, which looks bad because that
      panel is apparently a 6 bpc DP panel with faulty EDID.
      
      A fix for this was made by commit 013dd9e0
      ("drm/i915/dp: fall back to 18 bpp when sink capability is unknown").
      
      That commit triggers new regressions in precision for DP->DVI and
      DP->VGA displays. A patch is out to revert that commit, but it will
      revert video output for the AEO model 0 panel to 8 bpc without
      dithering.
      
      The EDID 1.3 of that panel, as decoded from the xrandr output
      attached to that bugzilla bug report, is somewhat faulty, and beyond
      other problems also sets the "DFP 1.x compliant TMDS" bit, which
      according to DFP spec means to drive the panel with 8 bpc and
      no dithering in absence of other colorimetry information.
      
      Try to make the original bug reporter happy despite the
      faulty EDID by adding a quirk to mark that panel as 6 bpc,
      so 6 bpc output with dithering creates a nice picture.
      
      Tested by injecting the edid from the fdo bug into a DP connector
      via drm_kms_helper.edid_firmware and verifying the 6 bpc + dithering
      is selected.
      
      This patch should be backported to stable.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: stable@vger.kernel.org
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e10aec65
    • J
      drm/tilcdc: Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb() · e0e344e6
      Jyri Sarha 提交于
      Change tilcdc_crtc_page_flip() to tilcdc_crtc_update_fb(). The
      function is not used as a page_flip() callback anymore so it is only
      confusing to call it that. The function should only be used by dummy
      primary plane commit() callback.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      e0e344e6
    • J
      drm/tilcdc: Remove unnecessary pm_runtime_get() and *_put() calls · d81b7f34
      Jyri Sarha 提交于
      Remove unnecessary pm_runtime_get() and *_put() calls from commit
      phase callbacks. Those calls are not needed since we have the whole
      commit phase between pm_runtime_get_sync() and pm_runtime_put_sync().
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      d81b7f34
    • J
      drm/tilcdc: Get rid of legacy dpms mechanism · 47bfd6c0
      Jyri Sarha 提交于
      Get rid of legacy dpms mechanism. This simplifies the code quite a
      bit. The old start() and stop() functions become tilcdc_crtc_enable()
      and *_disable(). The functions are added with all the necessary
      mechanisms from the old dpms function and they are used directly as
      the crtc helper enable() and disable() callbacks.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      47bfd6c0
    • J
      drm/tilcdc: Use drm_atomic_helper_resume/suspend() · 514d1a1f
      Jyri Sarha 提交于
      Use drm_atomic_helper_resume/suspend() and get rid off all the obsolete
      register level context restoring code.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      514d1a1f
    • J
      drm/tilcdc: Enable and disable interrupts in crtc start() and stop() · afaf833d
      Jyri Sarha 提交于
      Enable and disable interrupts in crtc start() and stop(). None of the
      interrupts can fire if CRTC is disabled, so it is cleaner - when
      considering suspend/resume code etc. - to enable the interrupts when
      CRTC is turned on and to disable them when CRTC is turned off.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      afaf833d
    • J
      drm/tilcdc: tfp410: Add atomic modeset helpers to connector funcs · 018cfbde
      Jyri Sarha 提交于
      Add atomic modeset helpers to tfp410 connector funcs. Property handling
      related helpers, atomic reset helper, and new dpms helper is needed in
      connector for atomic modeseting to work. The default helper functions
      are enough.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      018cfbde
    • J
      drm/tilcdc: tfp410: Set crtc panel info at init phase · 7c979b55
      Jyri Sarha 提交于
      Set crtc panel info at init phase. Setting it at prepare callback does
      it multiple times for no good reason and it is also too late when atomic
      modeset is used.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      7c979b55
    • J
      drm/tilcdc: panel: Add atomic modeset helpers to connector funcs · 0f65d89b
      Jyri Sarha 提交于
      Add atomic modeset helpers to panel connector funcs. Property handling
      related helpers, atomic reset helper, and new dpms helper is needed in
      connector for atomic modeseting to work. The default helper functions
      are enough.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      0f65d89b
    • J
      drm/tilcdc: panel: Set crtc panel info at init phase · ee6de21b
      Jyri Sarha 提交于
      Set crtc panel info at init phase. Setting it at prepare callback does
      it multiple times for no good reason and it is also too late when atomic
      modeset is used.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      ee6de21b
    • J
      drm/tilcdc: Remove tilcdc_verify_fb() · c72cc663
      Jyri Sarha 提交于
      Remove tilcdc_verify_fb(). The tilcdc_verify_fb() function is not
      needed because the same checks are implemented in
      tilcdc_plane_atomic_check().
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      c72cc663
    • J
      drm/tilcdc: Remove obsolete crtc helper functions · 6b4736db
      Jyri Sarha 提交于
      Remove obsolete crtc helper functions. These are not needed when
      atomic modeset is used.
      
      Note that the drm_crtc_helper_funcs mode_fixup() is still needed. The
      crtc's check() callback can not do its job here.
      
      The plane's check() callback needs to set drm_crtc_state's
      ->mode_changed to true if the pixel format for the framebuffer
      changes. Because of this drm_mode_config_funcs atomic_check() callback
      needs to call drm_atomic_helper_check_modeset() once more after it has
      called drm_atomic_helper_check_planes(). If the fixing of the
      adjusted_mode would be done in drm_crtc_helper_funcs atomic_check()
      callback, it would get over written by the extra
      drm_atomic_helper_check_modeset() call.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      6b4736db
    • J
      drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers · 305198de
      Jyri Sarha 提交于
      Set DRIVER_ATOMIC and use atomic helpers and rename commit and prepare
      crtc helpers to enable and disable. This makes the final jump to mode
      setting, but there is lot of obsolete code to clean up.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      305198de
    • J
      drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load() · 522a76f8
      Jyri Sarha 提交于
      Add drm_mode_config_reset() call to tilcdc_load(). This is need to
      initialize atomic state variables at load time.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      522a76f8
    • J
      drm/tilcdc: Add atomic mode config funcs · edc43303
      Jyri Sarha 提交于
      Add atomic mode config funcs. The atomic_commit implementation is a
      copy-paste from drm_atomic_helper_commit(), leaving out the async
      test. The similar copy-paste implementation appears to be used in many
      other drivers too. The standard drm_atomic_helper_check() is used for
      checking.
      
      The drm_atomic_helper_check() can not be used in drm_mode_config_funcs
      atomic_check() callback because the plane's check implementation may
      update crtc state's ->mode_changed flag. Because of this the
      drm_atomic_helper_check_modeset() has to be called once more after
      drm_atomic_helper_check_planes() (see drm_atomic_helper_check_modeset()
      documentation).
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      edc43303
    • J
      drm/tilcdc: Add tilcdc_crtc_atomic_check() · db380c58
      Jyri Sarha 提交于
      Add tilcdc_crtc_atomic_check(). Checks the display mode validity and
      the presence of the mandatory primary plane.
      
      The drm_crtc_helper_funcs mode_fixup() callback is left untouched and
      the check function does no try to do its job on purpose, despite what
      the mode_fixup() callback's documentations suggests.
      
      The plane's check() callback needs to set drm_crtc_state's
      ->mode_changed to true if the pixel format for the framebuffer
      changes. Because of this drm_mode_config_funcs atomic_check() callback
      needs to call drm_atomic_helper_check_modeset() once more after it has
      called drm_atomic_helper_check_planes(). If the fixing of the
      adjusted_mode would be done in drm_crtc_helper_funcs atomic_check()
      callback, it would get over written by the extra
      drm_atomic_helper_check_modeset() call.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      db380c58
    • J
      drm/tilcdc: Add tilcdc_crtc_mode_set_nofb() · f6382f18
      Jyri Sarha 提交于
      Add tilcdc_crtc_mode_set_nofb(). The mode_set_nofb() semantics do not
      fit well to LCDC, because of the mandatory framebuffer. However, when
      the primary plane is required in the check phase, it and the
      framebuffer can be found from the atomic state struct.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      f6382f18
    • J
      drm/tilcdc: Initialize dummy primary plane from crtc init · 47f571c6
      Jyri Sarha 提交于
      Initialize dummy primary plane from crtc init.
      Signed-off-by: NJyri Sarha <jsarha@ti.com>
      47f571c6