15 Apr, 2019

1 commit


10 Apr, 2019

1 commit

  • We should assign dedicated id for every tcon instance.
    This makes us be able to figure out bewteen master and
    slave tcon. Only side-by-side display mode is likely
    impacted. Based on tests, no functional change is
    observed before or after this patch is applied.

    Signed-off-by: Liu Ying
    (cherry picked from commit e181d9e56b096bbdc919f65b223d1bde413df1bb)

    Liu Ying
     

29 Mar, 2019

1 commit


28 Mar, 2019

2 commits

  • It isn't used out side of the file for now.

    Signed-off-by: Liu Ying
    (cherry picked from commit 13a0d5c3b15e42834b872b0da904f874ff717500)

    Liu Ying
     
  • Due to TKT320590, we are asked to turn TCON into operation mode later after
    the first dumb frame is generated by DPU. This makes DPR/PRG be able to
    evade the frame. However, it turns out we have to set the TCON into operation
    mode first and then wait for Framegen frame counter moving, otherwise, the
    display pipeline cannot be setup correctly sometimes(If pixel combiner is used,
    one of the two display streams is likely broken). This is a mysterious issue.
    So, we've already taken a workaround for the cases where pixel combiner is used.

    It appears that the similar issue is likely to happen for cases where pixel
    combiner is unused. That is to say, if pixel combiner is unused and prefetch
    engine is used, the first atomic flush after the enablement is likely to fail -
    content shadow load irq doesn't come. The sequence which the patch takes is
    the same to the one taken by the previous workaround. Based on tests, it is
    valid for cases with or without pixel combiner.

    Signed-off-by: Liu Ying
    (cherry picked from commit b6126aa9697c77896d2085997eec2a6995509f4b)

    Liu Ying
     

27 Mar, 2019

7 commits

  • Double check that the DTG IRQ STATUS register bit is set when handling
    the vblank and CTXLD kick interrupts to make sure we avoid spurious
    interrupts and kick the CTXLD in a bad moment.

    Signed-off-by: Laurentiu Palcu
    Reviewed-by: Robert Chiras
    (cherry picked from commit cc56e4e07f623d0b831e0f8347f2f3198697ee20)

    Laurentiu Palcu
     
  • Using one completion variable is not feasible as we can hit corner cases like
    enabling and then quickly disabling DCSS where we end up signaling that DTG was
    correctly disabled when, in fact, a VBLANK interrupt was received.

    Signed-off-by: Laurentiu Palcu
    Reviewed-by: Robert Chiras
    (cherry picked from commit 8073e87dce34548bea758c34d3b3557819c75551)

    Laurentiu Palcu
     
  • Currently, we set the colorimetry to BT.2020 even if the color-depth is
    8 bit. This is not according to HDMI specification.

    This patch makes sure we follow the specs.

    Signed-off-by: Laurentiu Palcu
    CC: Sandor Yu
    Reviewed-by: Sandor Yu
    Reviewed-by: Robert Chiras
    (cherry picked from commit cdacfaadd5dccfdca5dd68640d8f08506f6a9114)

    Laurentiu Palcu
     
  • A fixed PLL PMS setting for attached panel is obviously not
    enough for any other mipi panel which needs a different PLL
    output clock frequency, and besides, for the CEA-861 standard
    display modes, the 'pll_pms' table also can not cover all the
    modes requirements. So a general way is created to solve this
    problem which can provide an optimum solution to output a PLL
    bit clock to match the request frequency in a maximum degree
    and also satisfy the input clock and intermediate clocks limit
    according to the PLL specification.

    Signed-off-by: Fancy Fang
    (cherry picked from commit a73fdd5e48fe0df47685cfc197fe66edc1e28405)

    Fancy Fang
     
  • Add a new property 'pref-rate' support which can be used to
    assign a different clock frequency for the DPHY PLL reference
    clock in the dtb file. And if this property does not exist,
    the default clock frequency for the reference clock will be
    used. And according to the spec, the DPHY PLL reference clk
    frequency should be in [6MHz, 300MHz] range.

    Signed-off-by: Fancy Fang
    (cherry picked from commit a9fafe8108505f8a1580af898ff5fa9c26d03680)

    Fancy Fang
     
  • When there is no existing horizontal blanking word counts in
    'dsim_hblank_par' tables, these data requires to be computed
    according to the 'hfp', 'hbp' and 'hsa' timings which are in
    pixel unit. So the pixel unit data requires to be converted
    to word count unit data correctly to match the PLL output clk
    frequency.

    Signed-off-by: Fancy Fang
    (cherry picked from commit af9ab0d4362d9298978e2ac62033f65ea1cc09ed)

    Fancy Fang
     
  • Change the 'bit_clk' and 'pix_clk' fields of struct sec_mipi_dsim
    and the 'bit_clk' field of struct dsim_pll_pms from 'uint64_t' type
    to 'uint32_t' type, since first, these two fields are in KHz unit,
    and so 32 bit unsigned integer is enough to hold the data values,
    and second, use 32 bit integer can simplify related clocks compute.

    Signed-off-by: Fancy Fang
    (cherry picked from commit 3e62c748a531ca5eacbf6a616d3a979be5222b9c)

    Fancy Fang
     

24 Mar, 2019

2 commits


22 Mar, 2019

3 commits

  • Changing error message "Link rate is too high - forcing link to lower rate"
    to a debug message "Lowering DP link rate from to ".

    Signed-off-by: Oliver Brown

    Oliver Brown
     
  • Although the hardware spec doesn't mention the additional operation to
    wait for FrameGen secondary syncup for non-PC cases(FrameGen non-sync mode)
    when we enable a display, it turns out it helps avoid content stream(i.e.,
    extdst0 or extdst1) shadow load done event missing issue when the first
    page flip ocurrs after the display enablement. Black/blanked display
    is observed when the issue happens, which means the video signal is likely
    totally off. Adding this waiting operation also aligns to the cases
    where PC is used.

    Signed-off-by: Liu Ying
    (cherry picked from commit cfedc1269f35054c79d7fd2e2a914e97a4c1a47a)

    Liu Ying
     
  • Another coming patch will wait for framegen secondary channel syncup
    for non-sync mode cases. It appears that waiting for 50ms for video
    modes like 1920x1080p@24 and 1920x1080p@30 is not enough. So, this
    patch increases the timeout value to 100ms.

    Signed-off-by: Liu Ying
    (cherry picked from commit 5357bce465db659d69a5026882a899f2077ee078)

    Liu Ying
     

15 Mar, 2019

3 commits

  • In order to prevent stall from happening during the system suspend operations,
    the DPU KMS driver should use a freezable and unbound work queue for nonblock
    commits to make sure all work items are drained in the freeze phase of the
    suspend operations. So, let's hook up a commit function of our own onto
    ->atomic_commit to replace the original one drm_atomic_helper_commit() which
    uses the system_unbound_wq(unfreezable). The new function is almost a copy
    of drm_atomic_helper_commit() expect for the work queue replacement.

    Note that other drivers which use drm_atomic_helper_commit() may have
    the same problem during system suspend. The right fix should be at the
    DRM atomic core. However, being conservative for now, it is okay to fix the
    issue for this driver only.

    Signed-off-by: Liu Ying
    (cherry picked from commit a80ca5f87f047acea57ace9f9365794f99894285)

    Liu Ying
     
  • In order to prevent stall from happening during the system suspend operations,
    DPU KMS would use a freezable and unbound work queue for nonblock commits to
    replace the original one in DRM atomic helper, that is, the unfreezable
    system_unbound_wq. This patch introduces such a work queue and makes it ready
    to be used by the DPU KMS driver.

    Signed-off-by: Liu Ying
    (cherry picked from commit af5a701cf2c169fda987efa29ae882f032fdd084)

    Liu Ying
     
  • DPU KMS would use a freezable and unbound work queue for nonblock commits
    to prevent stall from happening during the system suspend operations in the
    coming commits. In order to make sure DCSS KMS has the same nonblock commit
    behaviour as before, the two drivers may have a work queue of their own
    respectively. So, let's make the work queues be driver specific.

    Signed-off-by: Liu Ying
    (cherry picked from commit 894623c295a647a36dd56b6a76b310970bd9a165)

    Liu Ying
     

14 Mar, 2019

2 commits


07 Mar, 2019

1 commit


05 Mar, 2019

7 commits


21 Feb, 2019

2 commits


19 Feb, 2019

1 commit

  • The following commit:

    459a5fac54d - MLK-20263: drm/imx/dcss: fix channel-0 line shift

    removed the 5 tap filter for vertical luma/chroma when YUV formats were
    used.

    Problem is that when the 7 tap filter is used for vertical luma/chroma,
    artifacts can be seen on screen when scaling.

    RGB can, however, function correctly with only 7 tap filter.

    This patch partially reverts the above patch and also does some cosmetic
    changes when calling the dcss_scaler_filter_design() using false/true
    instead of 0/1 for use_5_taps argument.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     

12 Feb, 2019

7 commits

  • Adding support for HDCP 1.4 and 2.2 based upon upstream 4.19 kernel
    use of "Content Protection" connector property.

    Signed-off-by: Oliver Brown

    Oliver Brown
     
  • Added content_type property to drm_connector_state
    in order to properly handle external HDMI TV content-type setting.

    v2:
    * Moved helper function which attaches content type property
    to the drm core, as was suggested.
    Removed redundant connector state initialization.

    v3:
    * Removed caps in drm_content_type_enum_list.
    After some discussion it turned out that HDMI Spec 1.4
    was wrongly assuming that IT Content(itc) bit doesn't affect
    Content type states, however itc bit needs to be manupulated
    as well. In order to not expose additional property for itc,
    for sake of simplicity it was decided to bind those together
    in same "content type" property.

    v4:
    * Added it_content checking in intel_digital_connector_atomic_check.
    Fixed documentation for new content type enum.

    v5:
    * Moved patch revision's description to commit messages.

    v6:
    * Minor naming fix for the content type enumeration string.

    v7:
    * Fix parameter name for documentation and parameter alignment
    in order not to get warning. Added Content Type description to
    new HDMI connector properties section.

    v8:
    * Thrown away unneeded numbers from HDMI content-type property
    description. Switch to strings desription instead of plain
    definitions.

    v9:
    * Moved away hdmi specific content-type enum from
    drm_connector_state. Content type property should probably not
    be bound to any specific connector interface in
    drm_connector_state.
    Same probably should be done to hdmi_picture_aspect_ration enum
    which is also contained in drm_connector_state. Added special
    helper function to get derive hdmi specific relevant infoframe
    fields.

    v10:
    * Added usage description to HDMI properties kernel doc.

    v11:
    * Created centralized function for filling HDMI AVI infoframe, based
    on correspondent DRM property value.

    Acked-by: Hans Verkuil
    Acked-by: Daniel Vetter
    Signed-off-by: Stanislav Lisovskiy
    Link: https://patchwork.freedesktop.org/patch/msgid/20180515135928.31092-2-stanislav.lisovskiy@intel.com
    [vsyrjala: clean up checkpatch multiple blank lines warnings]
    Signed-off-by: Ville Syrjälä

    Stanislav Lisovskiy
     
  • This patch adds a new optional connector property to allow userspace to enable
    protection over the content it is displaying. This will typically be implemented
    by the driver using HDCP.

    The property is a tri-state with the following values:
    - OFF: Self explanatory, no content protection
    - DESIRED: Userspace requests that the driver enable protection
    - ENABLED: Once the driver has authenticated the link, it sets this value

    The driver is responsible for downgrading ENABLED to DESIRED if the link becomes
    unprotected. The driver should also maintain the desiredness of protection
    across hotplug/dpms/suspend.

    If this looks familiar, I posted [1] this 3 years ago. We have been using this
    in ChromeOS across exynos, mediatek, and rockchip over that time.

    Changes in v2:
    - Pimp kerneldoc for content_protection_property (Daniel)
    - Drop sysfs attribute
    Changes in v3:
    - None
    Changes in v4:
    - Changed kerneldoc to recommend userspace polling (Daniel)
    - Changed kerneldoc to briefly describe how to attach the property (Daniel)
    Changes in v5:
    - checkpatch whitespace noise
    - Change DRM_MODE_CONTENT_PROTECTION_OFF to DRM_MODE_CONTENT_PROTECTION_UNDESIRED
    Changes in v6:
    - None

    Reviewed-by: Daniel Vetter
    Signed-off-by: Sean Paul

    [1] https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html
    Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-4-seanpaul@chromium.org

    Sean Paul
     
  • Implement the mode_valid in dcss-crtc to filter-out unsupported modes.
    In dcss-crtc, just use the mode_valid and mode_fixup functions from
    dcss-dtg.

    Signed-off-by: Robert Chiras
    Reviewed-by: Laurentiu Palcu

    Robert Chiras
     
  • Implement mode_valid and mode_fixup functions for the dcss-crtc
    driver so that DCSS can filter-out unsupported modes and save the
    configuration for the supported ones.
    Use mode_fixup to apply the saved configuration of a supported mode.
    The mechanism to determine if a mode is supported or not is made in
    dcss-dtg.

    Also, add 2 new clocks:
    - pll: this is the video PLL that provides the pixel clock; it's rate
    needs to be set such that the pixel clock can be achieved
    - pll_src*: this is an oscillator that can be used as source clock for
    the video pll; currently, there are possible maximum 3 pll sources,
    defined as pll_src1, pll_src2 and pll_src3. The actual clocks that
    can be used as pll source are: CLK_25M, CLK_27M and CLK_PHY_27MHZ

    Removed the pdiv_clk and pout_clk and replaced them with pix_clk,
    since out of those two only one was used: pdiv_clk, representing the pixel
    clock.

    In dcss-dtg, each mode is tested and if we can achieve it's pixel
    clock we save this mode configuration into an internal list and apply this
    configuration later on when mode_fixup is called.

    Signed-off-by: Robert Chiras
    Reviewed-by: Laurentiu Palcu

    Robert Chiras
     
  • Implement mode_valid and check functions from
    drm_simple_display_pipe_funcs such that we can filter-out modes that
    cannot be driven by this controller.
    Add 3 new clocks:
    - video_pll: this is the PLL that provides the pixel clock; it's rate
    needs to be set such that the pixel clock can be achieved
    - osc_25: this is an oscillater that can be used as source clock for the
    video_pll; default freq is 25MHz
    - osc_27: same as above, but with freq of 27MHz

    Depending on the display mode used, the video_pll needs to have it's
    clock source a 25MHz or 27MHz oscillator. Also, the video_pll rate needs
    to be set to a rate that can be evenly divided to obtain the required
    pixel clock. All these settings (clock source and video_pll rate) are
    saved in mode_valid, then applied before mode needs to be set in the
    check function.

    Signed-off-by: Robert Chiras
    Reviewed-by: Laurentiu Palcu

    Robert Chiras
     
  • The PL111 needs to filter valid modes based on memory bandwidth.
    I guess it is a pretty simple operation, so we can still claim
    the DRM KMS helper pipeline is simple after adding this (optional)
    vtable callback.

    Reviewed-by: Eric Anholt
    Reviewed-by: Daniel Vetter
    Signed-off-by: Linus Walleij
    Link: https://patchwork.freedesktop.org/patch/msgid/20180220072859.3386-1-linus.walleij@linaro.org

    Linus Walleij