Skip to content
  1. Mar 14, 2018
    • Mihail Atanassov's avatar
      drm: mali-dp: Add YUV->RGB conversion support for video layers · 6e810eb5
      Mihail Atanassov authored
      
      
      Internally Mali DP uses an RGB pipeline so video layers that support
      YUV input buffers need to convert the input data to RGB. The YUV
      buffers can have various encodings and this patch introduces support
      for BT.601, BT.709 and BT.2020 encodings, both limited and full ranges.
      
      This patch adds support for specifying the color encoding of the
      input buffers for the planes that are backed by the video layers
      and programs the YUV2RGB coefficients into hardware based on the
      selected encoding.
      
      Signed-off-by: default avatarMihail Atanassov <mihail.atanassov@arm.com>
      [updated to use standard properties]
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      6e810eb5
    • Liviu Dudau's avatar
      drm: mali-dp: Turn off CRTC vblank when removing module. · 57085dca
      Liviu Dudau authored
      
      
      When unbinding the mali-dp driver the drm_vblank_cleanup() function
      warns us that the vblanks are still enabled. Fix that by calling
      drm_crtc_vblank_off() in the malidp_unbind() function.
      
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      57085dca
    • Laurent Pinchart's avatar
      drm: arm: malidp: Use drm_atomic_helper_shutdown() to disable planes on removal · 828f2070
      Laurent Pinchart authored
      
      
      The plane cleanup handler currently calls drm_plane_helper_disable(),
      which is a legacy helper function. Replace it with a call to
      drm_atomic_helper_shutdown() at removal time.
      
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      828f2070
    • Laurent Pinchart's avatar
      drm: arm: malidp: Don't destroy planes manually in error handlers · 084ffbd7
      Laurent Pinchart authored
      
      
      The top-level error handler calls drm_mode_config_cleanup() which will
      destroy all planes. There's no need to destroy them manually in lower
      error handlers.
      
      As plane cleanup is now handled entirely by drm_mode_config_cleanup(),
      we must ensure that the plane .destroy() handler frees allocated memory
      for the plane object that was freed by malidp_de_planes_destroy(). Do so
      by replacing the call to devm_kfree() in the .destroy() handler by
      kfree(). devm_kfree() is currently a no-op as the plane memory is
      allocated with kzalloc(), not devm_kzalloc().
      
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      084ffbd7
    • Liviu Dudau's avatar
      drm/mali-dp: Fix malidp_atomic_commit_hw_done() for event sending. · d862b2d6
      Liviu Dudau authored
      
      
      Mali DP hardware has a 'go' bit (config_valid) for making the new scene
      parameters active at the next page flip. The problem with the current
      code is that the driver first sets this bit and then proceeds to wait
      for confirmation from the hardware that the configuration has been
      updated before arming the vblank event. As config_valid is actually
      asserted by the hardware after the vblank event, during the prefetch
      phase, when we get to arming the vblank event we are going to send it
      at the next vblank, in effect halving the vblank rate from the userspace
      perspective.
      
      Fix it by sending the userspace event from the IRQ handler, when we
      handle the config_valid interrupt, which syncs with the time when the
      hardware is active with the new parameters.
      
      Reported-by: default avatarAlexandru-Cosmin Gheorghe <alexandru-cosmin.gheorghe@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      d862b2d6
    • Ayan Halder's avatar
      drm/arm/malidp: Disable pixel alpha blending for colors that do not have alpha · f0437819
      Ayan Halder authored
      
      
      Mali dp needs to disable pixel alpha blending (use layer alpha blending) to
      display color formats that do not contain alpha bits per pixel
      
      This patch depends on:
      
      "[PATCH v2 01/19] drm/fourcc: Add a alpha field to drm_format_info"
      
      Signed-off-by: default avatarAyan Kumar Halder <ayan.halder@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      f0437819
    • Ayan Halder's avatar
      drm: mali-dp: Fix bug on scaling with rotation · 6cc3a505
      Ayan Halder authored
      
      
      In the case, when the user wants to scale and rotate a layer by 90/270
      degrees, the scaling engine input dimensions' parameters ie width and
      height needs to be swapped with respect to the layer's input dimensions.
      This means scaling engine input height should be set to layer's input
      width and scaling engine input width should be set to
      layer's input height.
      
      Signed-off-by: default avatarAyan Halder <ayan.halder@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      6cc3a505
    • Liviu Dudau's avatar
      drm/mali-dp: Don't enable scaling engine for planes that only rotate. · e0521c05
      Liviu Dudau authored
      
      
      Currently the scaling engine gets enabled for a plane where the input
      size differs from the composition size. As rotation is done natively
      by the plane's hardware layer, we don't need the scaling engine to be
      enabled.
      
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      e0521c05
    • Dan Carpenter's avatar
      drm: mali-dp: Uninitialized variable in malidp_se_check_scaling() · f2f2c85c
      Dan Carpenter authored
      
      
      We use "mc" without initializing it if scaling is not necessary.
      
      Fixes: 28ce675b ("drm: mali-dp: Add plane upscaling support")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarMihail Atanassov <Mihail.Atanassov@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      f2f2c85c
    • Liviu Dudau's avatar
      drm/mali-dp: Align pitch size to be multiple of bus burst read size. · 5ed4fdfa
      Liviu Dudau authored
      
      
      Mali DP hardware needs pitch line sizes aligned to the bus burst
      size for reads, so take that into consideration when allocating dumb
      buffers. If the layer is rotated then the stride size requirement is
      even larger for some hardware versions, so allocate for the worst case
      scenario. Update the ->dumb_create() hook to a driver specific function
      that sets the correct pitch size.
      
      Reported-by: default avatarAyan Halder <ayan.halder@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      5ed4fdfa
    • Liviu Dudau's avatar
      drm/mali-dp: Rotated planes need a larger pitch size. · fcad73b9
      Liviu Dudau authored
      
      
      Rotated planes need a pitch size that is aligned to 8 bytes
      for older DP500 and DP550 and at least 64 bytes for DP650. Replace
      the malidp_hw_pitch_valid() function with one that calculates
      the correct pitch alignment to take into account rotation.
      
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      fcad73b9
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · 963976cf
      Dave Airlie authored
      UAPI Changes:
      
      - Query uAPI interface (used for GPU topology information currently)
      	* Mesa: https://patchwork.freedesktop.org/series/38795/
      
      Driver Changes:
      
      - Increase PSR2 size for CNL (DK)
      - Avoid retraining LSPCON link unnecessarily (Ville)
      - Decrease request signaling latency (Chris)
      - GuC error capture fix (Daniele)
      
      * tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel: (127 commits)
        drm/i915: Update DRIVER_DATE to 20180308
        drm/i915: add schedule out notification of preempted but completed request
        drm/i915: expose rcs topology through query uAPI
        drm/i915: add query uAPI
        drm/i915: add rcs topology to error state
        drm/i915/debugfs: add rcs topology entry
        drm/i915/debugfs: reuse max slice/subslices already stored in sseu
        drm/i915: store all subslice masks
        drm/i915/guc: work around gcc-4.4.4 union initializer issue
        drm/i915/cnl: Add Wa_2201832410
        drm/i915/icl: Gen11 forcewake support
        drm/i915/icl: Add Indirect Context Offset for Gen11
        drm/i915/icl: Enhanced execution list support
        drm/i915/icl: new context descriptor support
        drm/i915/icl: Correctly initialize the Gen11 engines
        drm/i915: Assert that the request is indeed complete when signaled from irq
        drm/i915: Handle changing enable_fbc parameter at runtime better.
        drm/i915: Track whether the DP link is trained or not
        drm/i915: Nuke intel_dp->channel_eq_status
        drm/i915: Move SST DP link retraining into the ->post_hotplug() hook
        ...
      963976cf
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux into drm-next · 6fa7324a
      Dave Airlie authored
      Major points for this pull request:
      - Add dGPU support for amdkfd initialization code and queue handling. It's
        not complete support since the GPUVM part is missing (the under debate stuff).
      - Enable PCIe atomics for dGPU if present
      - Various adjustments to the amdgpu<-->amdkfd interface for dGPUs
      - Refactor IOMMUv2 code to allow loading amdkfd without IOMMUv2 in the system
      - Add HSA process eviction code in case of system memory pressure
      - Various fixes and small changes
      
      * tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux: (24 commits)
        uapi: Fix type used in ioctl parameter structures
        drm/amdkfd: Implement KFD process eviction/restore
        drm/amdkfd: Add GPUVM virtual address space to PDD
        drm/amdkfd: Remove unaligned memory access
        drm/amdkfd: Centralize IOMMUv2 code and make it conditional
        drm/amdgpu: Add submit IB function for KFD
        drm/amdgpu: Add GPUVM memory management functions for KFD
        drm/amdgpu: add amdgpu_sync_clone
        drm/amdgpu: Update kgd2kfd_shared_resources for dGPU support
        drm/amdgpu: Add KFD eviction fence
        drm/amdgpu: Remove unused kfd2kgd interface
        drm/amdgpu: Fix wrong mask in get_atc_vmid_pasid_mapping_pasid
        drm/amdgpu: Fix header file dependencies
        drm/amdgpu: Replace kgd_mem with amdgpu_bo for kernel pinned gtt mem
        drm/amdgpu: remove useless BUG_ONs
        drm/amdgpu: Enable KFD initialization on dGPUs
        drm/amdkfd: Add dGPU device IDs and device info
        drm/amdkfd: Add dGPU support to kernel_queue_init
        drm/amdkfd: Add dGPU support to the MQD manager
        drm/amdkfd: Add dGPU support to the device queue manager
        ...
      6fa7324a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 0b8eeac5
      Dave Airlie authored
      drm-misc-next for 4.17:
      
      UAPI Changes:
       plane: Add color encoding/range properties (Jyri)
       nouveau: Replace iturbt_709 property with color_encoding property (Ville)
      
      Core Changes:
       atomic: Move plane clipping into plane check helper (Ville)
       property: Multiple new property checks/verification (Ville)
      
      Driver Changes:
       rockchip: Fixes & improvements for rk3399/chromebook plus (various)
       sun4i: Add H3/H5 HDMI support (Jernej)
       i915: Add support for limited/full-range ycbcr toggling (Ville)
       pl111: Add bandwidth checking/limiting (Linus)
      
      Cc: Jernej Skrabec <jernej.skrabec@siol.net>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      
      * tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc: (85 commits)
        drm/rockchip: Don't use atomic constructs for psr
        drm/rockchip: analogix_dp: set psr activate/deactivate when enable/disable bridge
        drm/rockchip: dw_hdmi: Move HDMI vpll clock enable to bind()
        drm/rockchip: inno_hdmi: reorder clk_disable_unprepare call in unbind
        drm/rockchip: inno_hdmi: Fix error handling path.
        drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup.
        drm/nouveau: Replace the iturbt_709 prop with the standard COLOR_ENCODING prop
        drm/pl111: Use max memory bandwidth for resolution
        drm/bridge: sii902x: Retry status read after DDI I2C
        drm/pl111: Handle the RealView variant separately
        drm/pl111: Make the default BPP a per-variant variable
        drm: simple_kms_helper: Fix .mode_valid() documentation
        bridge: Elaborate a bit on dumb VGA bridges in Kconfig
        drm/atomic: Add new reverse iterator over all plane state (V2)
        drm: Reject bad property flag combinations
        drm: Make property flags u32
        drm/uapi: Deprecate DRM_MODE_PROP_PENDING
        drm: WARN when trying to add enum value > 63 to a bitmask property
        drm: WARN when trying add enum values to non-enum/bitmask properties
        drm: Reject replacing property enum values
        ...
      0b8eeac5
    • Dave Airlie's avatar
      drm/amd/pp: fix missing CONFIG_ACPI. · 62ccb653
      Dave Airlie authored
      
      
      This was stopping me building on ARM after last pull.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      62ccb653
  2. Mar 09, 2018
  3. Mar 08, 2018