27 Apr, 2018

2 commits


12 Apr, 2018

20 commits

  • We don't have correct support for fb x/y source offset for tile formats.
    The buffer address calculation is wrong when the offset is non-zero.
    Also, finer offset needs a fix in silicon(TKT344978). So, let's do not
    support the offset currently. We may add it back after we figure out
    how the updated silicon supports the offset.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • commit f2d3b2e8759a upstream.

    One of the major improvement of SMCCC v1.1 is that it only clobbers
    the first 4 registers, both on 32 and 64bit. This means that it
    becomes very easy to provide an inline version of the SMC call
    primitive, and avoid performing a function call to stash the
    registers that would otherwise be clobbered by SMCCC v1.0.

    Reviewed-by: Robin Murphy
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Marc Zyngier
     
  • commit ded4c39e93f3 upstream.

    Function identifiers are a 32bit, unsigned quantity. But we never
    tell so to the compiler, resulting in the following:

    4ac: b26187e0 mov x0, #0xffffffff80000001

    We thus rely on the firmware narrowing it for us, which is not
    always a reasonable expectation.

    Cc: stable@vger.kernel.org
    Reported-by: Ard Biesheuvel
    Acked-by: Ard Biesheuvel
    Reviewed-by: Robin Murphy
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Marc Zyngier
     
  • commit e78eef554a91 upstream.

    Since PSCI 1.0 allows the SMCCC version to be (indirectly) probed,
    let's do that at boot time, and expose the version of the calling
    convention as part of the psci_ops structure.

    Acked-by: Lorenzo Pieralisi
    Reviewed-by: Robin Murphy
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Marc Zyngier
     
  • commit 09a8d6d48499 upstream.

    In order to call into the firmware to apply workarounds, it is
    useful to find out whether we're using HVC or SMC. Let's expose
    this through the psci_ops.

    Acked-by: Lorenzo Pieralisi
    Reviewed-by: Robin Murphy
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Marc Zyngier
     
  • commit 6167ec5c9145 upstream.

    A new feature of SMCCC 1.1 is that it offers firmware-based CPU
    workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides
    BP hardening for CVE-2017-5715.

    If the host has some mitigation for this issue, report that
    we deal with it using SMCCC_ARCH_WORKAROUND_1, as we apply the
    host workaround on every guest exit.

    Tested-by: Ard Biesheuvel
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    no sve support in arch/arm64/include/asm/kvm_host.h
    mv changes from virt/kvm/arm/psci.c to arch/arm/kvm/psci.c
    using cpus_have_cap instead of cpus_have_const_cap

    Marc Zyngier
     
  • commit a4097b351118 upstream.

    We're about to need kvm_psci_version in HYP too. So let's turn it
    into a static inline, and pass the kvm structure as a second
    parameter (so that HYP can do a kern_hyp_va on it).

    Tested-by: Ard Biesheuvel
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    mv changes from virt/kvm/arm/psci.c to arch/arm/kvm/psci.c

    Marc Zyngier
     
  • commit 09e6be12effd upstream.

    The new SMC Calling Convention (v1.1) allows for a reduced overhead
    when calling into the firmware, and provides a new feature discovery
    mechanism.

    Make it visible to KVM guests.

    Tested-by: Ard Biesheuvel
    Reviewed-by: Christoffer Dall
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    mv change from virt/kvm/arm/psci.c to arch/arm/kvm/psci.c

    Marc Zyngier
     
  • commit 58e0b2239a4d upstream.

    PSCI 1.0 can be trivially implemented by providing the FEATURES
    call on top of PSCI 0.2 and returning 1.0 as the PSCI version.

    We happily ignore everything else, as they are either optional or
    are clarifications that do not require any additional change.

    PSCI 1.0 is now the default until we decide to add a userspace
    selection API.

    Reviewed-by: Christoffer Dall
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    mv chagnes from virt/kvm/arm/psci.c to arch/arm/kvm/psci.c

    Marc Zyngier
     
  • commit d0a144f12a7c upstream.

    As we're about to trigger a PSCI version explosion, it doesn't
    hurt to introduce a PSCI_VERSION helper that is going to be
    used everywhere.

    Reviewed-by: Christoffer Dall
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    mv change form virt/kvm/arm/psci.c to arch/arm/kvm/psci.c

    Marc Zyngier
     
  • commit 1a2fb94e6a77 upstream.

    As we're about to update the PSCI support, and because I'm lazy,
    let's move the PSCI include file to include/kvm so that both
    ARM architectures can find it.

    Acked-by: Christoffer Dall
    Tested-by: Ard Biesheuvel
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Conflicts:
    need kvm/arm_psci.h in files:
    arch/arm64/kvm/handle_exit.c
    arch/arm/kvm/psci.c and arch/arm/kvm/arm.c
    no virt/kvm/arm/arm.c and virt/kvm/arm/psci.c

    Marc Zyngier
     
  • commit 0f15adbb2861 upstream.

    Aliasing attacks against CPU branch predictors can allow an attacker to
    redirect speculative control flow on some CPUs and potentially divulge
    information from one context to another.

    This patch adds initial skeleton code behind a new Kconfig option to
    enable implementation-specific mitigations against these attacks for
    CPUs that are affected.

    Co-developed-by: Marc Zyngier
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Signed-off-by: Alex Shi

    Conflicts:
    expand enable_da_f in entry.S
    use 5 parameters ARM64_FTR_BITS()
    add percpu.h in mm_types.h for percpu functions
    use cpus_have_cap instead of cpus_have_const_cap
    arch/arm64/Kconfig
    arch/arm64/include/asm/cpucaps.h
    arch/arm64/include/asm/mmu.h
    arch/arm64/include/asm/sysreg.h
    arch/arm64/kernel/cpufeature.c
    arch/arm64/kernel/entry.S
    arch/arm64/mm/fault.c

    Will Deacon
     
  • commit d68e3ba5303f upstream.

    Entry into recent versions of ARM Trusted Firmware will invalidate the CPU
    branch predictor state in order to protect against aliasing attacks.

    This patch exposes the PSCI "VERSION" function via psci_ops, so that it
    can be invoked outside of the PSCI driver where necessary.

    Acked-by: Lorenzo Pieralisi
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Signed-off-by: Alex Shi

    Will Deacon
     
  • commit 568c5fe5a54 upstream.

    Certain architectures may have the kernel image mapped separately to
    alias the linear map. Introduce a macro lm_alias to translate a kernel
    image symbol into its linear alias. This is used in part with work to
    add CONFIG_DEBUG_VIRTUAL support for arm64.

    Reviewed-by: Mark Rutland
    Tested-by: Mark Rutland
    Signed-off-by: Laura Abbott
    Signed-off-by: Will Deacon
    Signed-off-by: Alex Shi

    Laura Abbott
     
  • commit 39290b389ea upstream.

    The current "rodata=off" parameter disables read-only kernel mappings
    under CONFIG_DEBUG_RODATA:
    commit d2aa1acad22f ("mm/init: Add 'rodata=off' boot cmdline parameter
    to disable read-only kernel mappings")

    This patch is a logical extension to module mappings ie. read-only mappings
    at module loading can be disabled even if CONFIG_DEBUG_SET_MODULE_RONX
    (mainly for debug use). Please note, however, that it only affects RO/RW
    permissions, keeping NX set.

    This is the first step to make CONFIG_DEBUG_SET_MODULE_RONX mandatory
    (always-on) in the future as CONFIG_DEBUG_RODATA on x86 and arm64.

    Suggested-by: and Acked-by: Mark Rutland
    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Kees Cook
    Acked-by: Rusty Russell
    Link: http://lkml.kernel.org/r/20161114061505.15238-1-takahiro.akashi@linaro.org
    Signed-off-by: Jessica Yu
    Signed-off-by: Alex Shi

    Conflicts:
    keeping kaiser.h in init/main.c

    AKASHI Takahiro
     
  • According to ANSI-CTA-861-G specification:
    * EOTF is 8 bit, not 16;
    * metadata type is 8 bit, not 16;
    * There's no "Minimum Content Light Level"

    This patch will change the HDR metadata structures to reflect that. Also, this
    will fix problems seen on some TVs that were rejecting HDR metadata because
    it's size was too big (more than 26 bytes).

    Signed-off-by: Laurentiu Palcu
    CC: Sandor Yu

    Laurentiu Palcu
     
  • NXP i.MX7ULP EVK boards all sensors connect with M4 core, A core
    has to conmunicate with sensors by virtual io bus like rpmsg bus.
    The driver implement the virtual sensor input driver to configure
    sensors active/idle/delay actions and report the sensors' event to
    user space.

    Supply below sysfs for user to enable/disable detector and counter,
    set poll delay:
    /sys/class/misc/step_counter/enable
    /sys/class/misc/step_detector/enable
    /sys/class/misc/step_counter/poll_delay

    Reviewed-by: Elven Wang
    Signed-off-by: Fugang Duan

    Fugang Duan
     
  • This patch remove the commit 3d8a438c53f3 ("mmc: Allow setting slot index via
    devicetree alias"),which wrongly use the function ida_simple_get(), causing
    this function return unexpected result when the reserved alias index value is
    not 0.

    In the meantime, the 'devidx' in the mmc block layer code just impact the minor
    device number, no need to align the minor device number and the slot index.

    Here remove upper mentioned patch, and will reform the feature of setting slot
    index via devicetree alias in the next few patches.

    This patch also remove one other related patch:
    commit 82f323ade111 ("MLK-12617 mmc: Fix compile error when CONFIG_MMC=m").

    Reported-by: Leonard Crestez
    Acked-by: Dong Aisheng
    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • Add power domain macro names for CI_PI subsystem.

    Reviewed-by: Sandor.Yu
    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit fd8318f4455ceafda963681ce05effd0ad81d714)

    Guoniu.Zhou
     
  • Register clocks for CI_PI subsystem.

    Reviewed-by: Sandor.Yu
    Signed-off-by: Guoniu.Zhou
    (cherry picked from commit d29308ec4fa29addd049c114520d7628e9e921d7)

    Guoniu.Zhou
     

21 Mar, 2018

18 commits

  • The DPR works in manual mode for the first frame and we need to
    switch it to auto mode so that auto shadow load mechanism works.
    The designers require us to switch the DPR manual mode to auto mode
    directly for display controllers instead of using the DPR control
    done irq handler, because the irq will not come in some cases(which
    leads to shadow load failure). Finer switch operations on DPR
    register bits are needed for SW_SHADOW_LOAD_SEL, SHADOW_LOAD_EN,
    RUN_EN and REPEAT_EN. Also, for overlay planes, we need to wait for
    a frame additionally in the "on-the-fly" cases to make sure the
    switch is successful. In all, this patch should be able to address
    frame dropping and screen tearing issue(due to the shadow load
    failure) when users play video on overlay planes.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • The ESAI and SPDIF pin are in enet bank, the board is using 3.3v,
    so we need to configure the PSW_OVR to zero, whose default setting
    is for 2.5V.

    Signed-off-by: Anson Huang
    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • Use the bus format that was established by CRTC in
    crtc->mode.private_flags.
    This will be available during enable phase.

    The DSI host will be configured via interface_color_coding
    and pixel_format (DPI-2 interface ports).
    Previously the interface_color_coding was hardcoded to 24-bit.

    Set the DSI pixel format before it is necessary in
    nwl_dsi_get_bit_clock, during imx_nwl_dsi_enable.

    Signed-off-by: Mirela Rabulea

    Mirela Rabulea
     
  • Some resources are being enabled without the associated resource being
    powered up.

    Signed-off-by: Oliver Brown

    Oliver Brown
     
  • Signed-off-by: Andrii Anisov
    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk
    (cherry picked from commit 69369f52d28a34c84acb6f2a8a585e743441566a)

    on 8QM A0, video play use ion to allocate buffer and mmap buffer,
    there is a call dma_get_sgtable, but xen arm not implement that.
    when playing video, GPU driver will use sg dma address, but because
    of xen_swiotlb_get_sgtable not implemented, sg->amd_address is not
    exactly the address that ion allocated. This patch fixes the issue.

    Signed-off-by: Peng Fan
    Acked-by: Leonard Crestez

    Andrii Anisov
     
  • The resources for a plane group are shared by the two display streams
    of one DPU. Thus, the two Framegen(fg) instances of one DPU should be
    in the plane group resource. The resource users may find the fg instance
    onto which the resources are built via the stream id. This patch corrects
    the number of fg instances in a plane group resource from one to two.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • This adds the infrastructure needed to quirk displays
    using edid and to mark them a non-desktop.

    A non-desktop display is one which shouldn't normally be included
    as a part of a desktop environment.

    This is meant to cover head mounted devices like HTC Vive.

    v2: Change description from non-standard to non-desktop, add docs

    Reviewed-by: Keith Packard
    Signed-off-by: Dave Airlie
    Signed-off-by: Marius Vlad

    (Ported 66660d4cf21b7dfcb25 from git://people.freedesktop.org/~airlied/linux)

    Dave Airlie
     
  • Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • This patch adds basic HDR10 support. However, full support depends on
    subsequent patches.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • This is 10-bit per channel YUV420 semi-planar.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • This patch adds helper functions for YCBCR 420 handling.
    These functions do:
    - check if a given video mode is YCBCR 420 only mode.
    - check if a given video mode is YCBCR 420 also mode.

    V2: Added YCBCR functions as helpers in DRM layer, instead of
    keeping it in I915 layer.
    V3: Added handling for YCBCR-420 only modes too.
    V4: EXPORT_SYMBOL(drm_find_hdmi_output_type)
    V5: Addressed review comments from Danvet:
    - %s/drm_find_hdmi_output_type/drm_display_info_hdmi_output_type
    - %s/drm_can_support_ycbcr_output/drm_display_supports_ycbcr_output
    - %s/drm_can_support_this_ycbcr_output/
    drm_display_supports_this_ycbcr_output
    - pass drm_display_info instead of drm_connector for consistency
    - For drm_get_highest_quality_ycbcr_supported doc, move the variable
    description above, and then the function description.
    V6: Add only YCBCR420 helpers (Ville)
    V7: Addressed review comments from Ville
    - Remove cea_vic_valid() check.
    - Fix indentation.
    - Make input parameters to helpers, const.

    Cc: Ville Syrjala
    Cc: Jose Abreu
    Cc: Daniel Vetter
    Signed-off-by: Shashank Sharma
    Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-9-git-send-email-shashank.sharma@intel.com
    [vsyrjala: Fix sparse indentation warn]
    Signed-off-by: Ville Syrjälä

    Shashank Sharma
     
  • CEA-861-F spec adds ycbcr420 deep color support information
    in hf-vsdb block. This patch extends the existing hf-vsdb parsing
    function by adding parsing of ycbcr420 deep color support from the
    EDID and adding it into display information stored.

    V2: Rebase
    V3: Rebase
    V4: Moved definition of y420_dc_modes into this patch, where its used
    (Ville)
    V5: Optimize function, if(conditions) not reqd (Ville)
    V6: Rebase
    V7: Rebase

    Cc: Ville Syrjälä
    Cc: Jose Abreu
    Signed-off-by: Shashank Sharma
    Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-8-git-send-email-shashank.sharma@intel.com
    [vsyrjala: Fix sparse indentation warn]
    Signed-off-by: Ville Syrjälä

    Shashank Sharma
     
  • HDMI 2.0 spec adds support for YCBCR420 sub-sampled output.
    CEA-861-F adds two new blocks in EDID's CEA extension blocks,
    to provide information about sink's YCBCR420 output capabilities.

    These blocks are:

    - YCBCR420vdb(YCBCR 420 video data block):
    This block contains VICs of video modes, which can be sopported only
    in YCBCR420 output mode (Not in RGB/YCBCR444/422. Its like a normal
    SVD block, valid for YCBCR420 modes only.

    - YCBCR420cmdb(YCBCR 420 capability map data block):
    This block gives information about video modes which can support
    YCBCR420 output mode also (along with RGB,YCBCR444/422 etc) This
    block contains a bitmap index of normal svd videomodes, which can
    support YCBCR420 output too.
    So if bit 0 from first vcb byte is set, first video mode in the svd
    list can support YCBCR420 output too. Bit 1 means second video mode
    from svd list can support YCBCR420 output too, and so on.

    This patch adds two bitmaps in display's hdmi_info structure, one each
    for VCB and VDB modes. If the source is HDMI 2.0 capable, this patch
    adds:
    - VDB modes (YCBCR 420 only modes) in connector's mode list, also makes
    an entry in the vdb_bitmap per vic.
    - VCB modes (YCBCR 420 also modes) only entry in the vcb_bitmap.

    Cc: Ville Syrjala
    Cc: Jose Abreu
    Cc: Emil Velikov

    V2: Addressed
    Review comments from Emil:
    - Use 1ULL<< 64 modes in capability map block.
    - Use y420cmdb in function names and macros while dealing with vcb
    to be aligned with spec.
    - Move the display information parsing block ahead of mode parsing
    blocks.

    V3: Addressed design/review comments from Ville
    - Do not add flags in video modes, else we have to expose them to user
    - There should not be a UABI change, and kernel should detect the
    choice of the output based on type of mode, and the bitmaps.
    - Use standard bitops from kernel bitmap header, instead of calculating
    bit positions manually.

    V4: Addressed review comments from Ville:
    - s/ycbcr_420_vdb/y420vdb
    - s/ycbcr_420_vcb/y420cmdb
    - Be less verbose on description of do_y420vdb_modes
    - Move newmode variable in the loop scope.
    - Use svd_to_vic() to get a VIC, instead of 0x7f
    - Remove bitmap description for CMDB modes & VDB modes
    - Dont add connector->ycbcr_420_allowed check for cmdb modes
    - Remove 'len' variable, in is_y420cmdb function, which is used
    only once
    - Add length check in is_y420vdb function
    - Remove unnecessary if (!db) check in function parse_y420cmdb_bitmap
    - Do not add print about YCBCR 420 modes
    - Fix indentation in few places
    - Move ycbcr420_dc_modes in next patch, where its used
    - Add a separate patch for movement of drm_add_display_info()

    V5: Addressed review comments from Ville:
    - Add the patch which cleans up the current EXTENDED_TAG usage
    - Make y420_cmdb_map u64
    - Do not block ycbcr420 modes while parsing the EDID, rather
    add a separate helper function to prune ycbcr420-only modes from
    connector's probed modes.

    V6: Rebase
    V7: Move this patch after the 420_only validation patch (Ville)
    V8: Addressed review comments from Ville
    - use cea_vic_valid check before adding cmdb/vdb modes
    - add check for i < 64 while adding cmdb modes
    - use 1ULL while checking bitmap

    Signed-off-by: Shashank Sharma
    Link: http://patchwork.freedesktop.org/patch/msgid/1500028426-14883-1-git-send-email-shashank.sharma@intel.com
    [vsyrjala: Fix checkpatch complaints and indentation]
    Signed-off-by: Ville Syrjälä

    Shashank Sharma
     
  • YCBCR420 modes are supported only on HDMI 2.0 capable sources.
    This patch adds:
    - A drm helper to validate YCBCR420-only mode on a particular
    connector. This function will help pruning the YCBCR420-only
    modes from the connector's modelist.
    - A bool variable (ycbcr_420_allowed) in the drm connector structure.
    While handling the EDID from HDMI 2.0 sinks, its important to know
    if the source is capable of handling YCBCR420 output, so that no
    YCBCR 420 modes will be listed for sources which can't handle it.
    A driver should set this variable if it wants to see YCBCR420 modes
    in the modedb.

    V5: Introduced the patch in series.
    V6: Squashed two patches (validate YCBCR420 and add YCBCR420
    identifier)
    V7: Addressed review comments from Vile:
    - Move this patch before we add 420 modes from EDID.
    - No need for drm_valid_cea_vic() check, function back to non-static.
    - Update MODE_STATUS with NO_420 condition.
    - Introduce y420_vdb_modes variable in this patch

    Cc: Ville Syrjala
    Signed-off-by: Shashank Sharma
    Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-6-git-send-email-shashank.sharma@intel.com
    [vsyrjala: Drop the now bogus EXPORT_SYMBOL(drm_valid_cea_vic)]
    Signed-off-by: Ville Syrjälä

    Shashank Sharma
     
  • Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • Enable Dynamic Range and Mastering Infoframe for HDR
    content, which is defined in CEA 861.3 spec.

    The metadata will be computed based on blending
    policy in userspace compositors and passed as a connector
    property blob to driver. The same will be sent as infoframe
    to panel which support HDR.

    Signed-off-by: Uma Shankar

    Uma Shankar