08 Nov, 2018

2 commits

  • Add drm_mode_config_helper_suspend/resume() which takes care of
    atomic modeset suspend/resume for simple use cases.
    The suspend state is stored in struct drm_mode_config.

    Signed-off-by: Noralf Trønnes
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20171106191812.38927-3-noralf@tronnes.org

    Noralf Trønnes
     
  • drm_fb_helper is *the* way of doing fbdev emulation so add a pointer to
    struct drm_device. This makes it possible to add callback helpers for
    .last_close and .output_poll_changed further reducing fbdev emulation
    footprint in drivers. The pointer is set by drm_fb_helper_init() and
    cleared by drm_fb_helper_fini().

    Signed-off-by: Noralf Trønnes
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20171030153951.56269-3-noralf@tronnes.org

    Noralf Trønnes
     

29 Oct, 2018

21 commits

  • In the macro 'DSIM_DPHY_TIMING' definition, the field
    'clk_trail' assignment to 'ctrail' is missing which
    certainly needs to be added.

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

    Fancy Fang
     
  • The SEC provides a table to guide the DPHY TIMINGS config based
    on the PLL output bit clock frequency for DSIM. So create the
    table which is used by SEC LN14LPP DPHY with HS Timing v1.2 and
    this table will be used by the SEC DSIM Bridge driver to help to
    config the corresponding DPHY Timings correctly for each display
    mode. Along with the table, a DPHY TIMING table entry 'compare'
    method is implemented for the binary search when lookup the
    suitable DPHY TIMING entry.

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

    Fancy Fang
     
  • Defer the PLL output check to the SEC DSIM Encoder's atomic check
    from SEC DSIM Bridge's mode_fixup(), since in the attached DSI
    device Bridge's mode_fixup(), it may change the data lanes number,
    and this change is done after the SEC DSIM Bridge's mode_fixup().
    And the DSIM Encoder's atomic check is the ideal place to do this
    PLL check, since it happens after all the Bridges' mode_fixup()
    done.

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

    Fancy Fang
     
  • This is the abstracted bridge driver for Samsung MIPI DSIM
    controller. This driver only foucses on the DSIM controller
    itself configurations and never care about any config about
    the platforms. So it can be shared by different platforms
    without any modifications.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • The drm_parse_ycbcr420_deep_color_info() is called only for HDMI 2.0,
    however the DC masks were incorrectly set. These were set according
    to HDMI 1.4 specification.

    This patch will set the deep color depth masks to the HDMI 2.x specs
    (see Table 10-6 in HDMI 2.x specs for field descriptions).

    Signed-off-by: Laurentiu Palcu
    (cherry picked from commit e3a1cac6fdd88f4391180d89d5881748214a1b4f)

    Laurentiu Palcu
     
  • Since the drm_bridge_attach function now supports chained bridges, there
    is no need for nwl_dsi_add_bridge and nwl_dsi_del_bridge functions, so
    remove them.
    Now, we can pass the existent bridge to drm_bridge_attach.

    This fixes a bug created during kernel 4.14 rebase process.

    Signed-off-by: Robert Chiras

    Robert Chiras
     
  • 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
     
  • 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
     
  • 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
     
  • EA 861.3 spec adds colorimetry data block for HDMI.
    Parsing the block to get the colorimetry data from
    panel.

    Signed-off-by: Uma Shankar

    Uma Shankar
     
  • Hardware may have HDR capability on certain plane
    engines. Enabling the same in drm plane structure
    so that this can be communicated to user space.

    Each drm driver should set this flag to true for planes
    which support HDR.

    Signed-off-by: Uma Shankar

    Uma Shankar
     
  • This patch adds a blob property to get HDR metadata
    information from userspace. This will be send as part
    of AVI Infoframe to panel.

    Signed-off-by: Uma Shankar

    Uma Shankar
     
  • Currently, the Northwest Logic MIPI-DSI controller host specific code
    resides under drm/bridge, but is not a real drm_bridge. It creates a
    drm_bridge and adds itself to the drm_encoder that handles this file,
    but this is wrong, since it does not implement the drm_bridge_funcs.

    The correct way to implement a drm_bridge is to add the drm_bridge and
    let other components (another bridge or a drm_encoder) to attach to this
    bridge.
    Since we are doing this, a new compatible strings can be used for this
    driver: "nwl,mipi-dsi".

    Since this was used by nwl_dsi-imx.c, update that driver to use this
    bridge correctly.

    This is needed in order to add support for MIPI-DSI on 8MQ. The IMX_NWL
    driver will either add a DSI encoder to DRM, or a DSI bridge.
    The encoder will be used by imx-drm-core driver, while the bridge
    will be used by MXSFB driver (which creates a simple display pipe).

    Signed-off-by: Robert Chiras

    Robert Chiras
     
  • drm_mode_create_lease

    Creates a lease for a list of drm mode objects, returning an
    fd for the new drm_master and a 64-bit identifier for the lessee

    drm_mode_list_lesees

    List the identifiers of the lessees for a master file

    drm_mode_get_lease

    List the leased objects for a master file

    drm_mode_revoke_lease

    Erase the set of objects managed by a lease.

    This should suffice to at least create and query leases.

    Changes for v2 as suggested by Daniel Vetter :

    * query ioctls only query the master associated with
    the provided file.

    * 'mask_lease' value has been removed

    * change ioctl has been removed.

    Changes for v3 suggested in part by Dave Airlie

    * Add revoke ioctl.

    Changes for v4 suggested by Dave Airlie

    * Expand on the comment about the magic use of &drm_lease_idr_object
    * Pad lease ioctl structures to align on 64-bit boundaries

    Changes for v5 suggested by Dave Airlie

    * Check for non-negative object_id in create_lease to avoid debug
    output from the kernel.

    Changes for v6 provided by Dave Airlie

    * For non-universal planes add primary/cursor planes to lease

    If we aren't exposing universal planes to this userspace client,
    and it requests a lease on a crtc, we should implicitly export the
    primary and cursor planes for the crtc.

    If the lessee doesn't request universal planes, it will just see
    the crtc, but if it does request them it will then see the plane
    objects as well.

    This also moves the object look ups earlier as a side effect, so
    we'd exit the ioctl quicker for non-existant objects.

    * Restrict leases to crtc/connector/planes.

    This only allows leasing for objects we wish to allow.

    Changes for v7 provided by Dave Airlie

    * Check pad args are 0
    * Check create flags and object count are valid.
    * Check return from fd allocation
    * Refactor lease idr setup and add some simple validation
    * Use idr_mutex uniformly (Keith)

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie
    (cherry picked from commit 62884cd386b876638720ef88374b31a84ca7ee5f)

    Keith Packard
     
  • Attempts to modify un-leased objects are rejected with an error.
    Information returned about unleased objects is modified to make them
    appear unusable and/or disconnected.

    Changes for v2 as suggested by Daniel Vetter :

    * With the change in the __drm_mode_object_find API to pass the
    file_priv along, we can now centralize most of the lease-based
    access checks in that function.

    * A few places skip that API and require in-line checks.

    Changes for v3 provided by Dave Airlie

    * remove support for leasing encoders.
    * add support for leasing planes.

    Changes for v4

    * Only call drm_lease_held if DRIVER_MODESET.

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie
    (cherry picked from commit 7de440db20d4531e4b740bf17b56afc426c54377)

    Keith Packard
     
  • This provides new data structures to hold "lease" information about
    drm mode setting objects, and provides for creating new drm_masters
    which have access to a subset of the available drm resources.

    An 'owner' is a drm_master which is not leasing the objects from
    another drm_master, and hence 'owns' them.

    A 'lessee' is a drm_master which is leasing objects from some other
    drm_master. Each lessee holds the set of objects which it is leasing
    from the lessor.

    A 'lessor' is a drm_master which is leasing objects to another
    drm_master. This is the same as the owner in the current code.

    The set of objects any drm_master 'controls' is limited to the set of
    objects it leases (for lessees) or all objects (for owners).

    Objects not controlled by a drm_master cannot be modified through the
    various state manipulating ioctls, and any state reported back to user
    space will be edited to make them appear idle and/or unusable. For
    instance, connectors always report 'disconnected', while encoders
    report no possible crtcs or clones.

    The full list of lessees leasing objects from an owner (either
    directly, or indirectly through another lessee), can be searched from
    an idr in the drm_master of the owner.

    Changes for v2 as suggested by Daniel Vetter :

    * Sub-leasing has been disabled.

    * BUG_ON for lock checking replaced with lockdep_assert_held

    * 'change' ioctl has been removed.

    * Leased objects can always be controlled by the lessor; the
    'mask_lease' flag has been removed

    * Checking for leased status has been simplified, replacing
    the drm_lease_check function with drm_lease_held.

    Changes in v3, some suggested by Dave Airlie

    * Add revocation. This allows leases to be effectively revoked by
    removing all of the objects they have access to. The lease itself
    hangs around as it's hanging off a file.

    * Free the leases IDR when the master is destroyed

    * _drm_lease_held should look at lessees, not lessor

    * Allow non-master files to check for lease status

    Changes in v4, suggested by Dave Airlie

    * Formatting and whitespace changes

    Changes in v5 (airlied)

    * check DRIVER_MODESET before lease destroy call
    * check DRIVER_MODESET for lease revoke (Chris)
    * Use idr_mutex uniformly for all lease elements of struct drm_master. (Keith)

    Signed-off-by: Keith Packard
    (cherry picked from commit 2ed077e467eedb033032bc4b6e349365517662d6)

    Keith Packard
     
  • This will allow __drm_mode_object_file to be extended to perform
    access control checks based on the file in use.

    v2: Also fix up vboxvideo driver in staging

    [airlied: merging early as this is an API change]

    Suggested-by: Daniel Vetter
    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie
    (cherry picked from commit 418da17214aca5ef5f0b6f7588905ee7df92f98f)

    Keith Packard
     
  • Separate out lease debugging from the core.

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie
    (cherry picked from commit e7646f84ad4f654e1ee503b03a12e520d947884f)

    Keith Packard
     
  • Add support for the NorthWest Logit MIPI-DSI controller found in mx8
    platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
    The NWL MIPI-DSI driver is implemented as a DRM bridge.
    The MIPI-DSI encoder will contain the platform specific changes and will
    use this bridge.

    Signed-off-by: Robert Chiras

    Robert Chiras
     
  • A component master may have both OF based and non-OF based components to be
    bound with. This patch adds a helper drm_of_component_probe_with_match()
    similar to drm_of_component_probe() so that the new helper may get an
    additional provided match pointer(contains match entries for non-OF based
    components) to support this case.

    Tested-by: Meng Mingming
    Signed-off-by: Liu Ying

    Liu Ying
     

03 Aug, 2018

1 commit

  • [ Upstream commit 4f212e40468650e220c1770876c7f25b8e0c1ff5 ]

    To comply with eDP1.4a this bit should be set when enabling PSR2.

    Signed-off-by: José Roberto de Souza
    Reviewed-by: Rodrigo Vivi
    Signed-off-by: Rodrigo Vivi
    Link: https://patchwork.freedesktop.org/patch/msgid/20180328223046.16125-1-jose.souza@intel.com
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    José Roberto de Souza
     

29 Mar, 2018

1 commit

  • commit e7cdf5c82f1773c3386b93bbcf13b9bfff29fa31 upstream.

    The vk cts test:
    dEQP-VK.api.external.semaphore.opaque_fd.export_multiple_times_temporary

    triggers a lot of
    VFS: Close: file count is 0

    Dave pointed out that clearing the syncobj->file from
    drm_syncobj_file_release() was sufficient to silence the test, but that
    opens a can of worm since we assumed that the syncobj->file was never
    unset. Stop trying to reuse the same struct file for every fd pointing
    to the drm_syncobj, and allocate one file for each fd instead.

    v2: Fixup return handling of drm_syncobj_fd_to_handle
    v2.1: [airlied: fix possible syncobj ref race]
    v2.2: [jekstrand: back-port to 4.14]

    Reported-by: Dave Airlie
    Signed-off-by: Chris Wilson
    Tested-by: Dave Airlie
    Reviewed-by: Daniel Vetter
    Signed-off-by: Dave Airlie
    Signed-off-by: Jason Ekstrand
    Tested-by: Clayton Craft
    Signed-off-by: Greg Kroah-Hartman

    Chris Wilson
     

15 Mar, 2018

2 commits

  • commit c20bb155c2c5acb775f68be5d84fe679687c3c1e upstream.

    Nouveau only exposes support for XBGR2101010. Prior to the atomic
    conversion, drm would pass in the wrong format in the framebuffer, but
    it was always ignored -- both userspace (xf86-video-nouveau) and the
    kernel driver agreed on the layout, so the fact that the format was
    wrong didn't matter.

    With the atomic conversion, nouveau all of a sudden started caring about
    the exact format, and so the previously-working code in
    xf86-video-nouveau no longer functioned since the (internally-assigned)
    format from the addfb ioctl was wrong.

    This change adds infrastructure to allow a drm driver to specify that it
    prefers the XBGR format variant for the addfb ioctl, and makes nouveau's
    nv50 display driver set it. (Prior gens had no support for 30bpp at all.)

    Signed-off-by: Ilia Mirkin
    Cc: stable@vger.kernel.org # v4.10+
    Acked-by: Ben Skeggs
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20180203191123.31507-1-imirkin@alum.mit.edu
    Signed-off-by: Greg Kroah-Hartman

    Ilia Mirkin
     
  • commit 25c058ccaf2ebbc3e250ec1e199e161f91fe27d4 upstream.

    Introduce a helper to determine if the current task is an output poll
    worker.

    This allows us to fix a long-standing deadlock in several DRM drivers
    wherein the ->runtime_suspend callback waits for the output poll worker
    to finish and the worker in turn calls a ->detect callback which waits
    for runtime suspend to finish. The ->detect callback is invoked from
    multiple call sites and waiting for runtime suspend to finish is the
    correct thing to do except if it's executing in the context of the
    worker.

    v2: Expand kerneldoc to specifically mention deadlock between
    output poll worker and autosuspend worker as use case. (Lyude)

    Cc: Dave Airlie
    Cc: Ben Skeggs
    Cc: Alex Deucher
    Reviewed-by: Lyude Paul
    Signed-off-by: Lukas Wunner
    Link: https://patchwork.freedesktop.org/patch/msgid/3549ce32e7f1467102e70d3e9cbf70c46bfe108e.1518593424.git.lukas@wunner.de
    Signed-off-by: Greg Kroah-Hartman

    Lukas Wunner
     

22 Feb, 2018

3 commits

  • commit 33aa69ed8aacd92dea12671e52eb3ca6ac2d7a49 upstream.

    CFL was missing from intel_early_ids[]. The PCI ID needs to be there to
    allow the memory region to be stolen, otherwise we could have RAM being
    arbitrarily overwritten if for example we keep using the UEFI framebuffer,
    depending on how BIOS has set up the e820 map.

    Fixes: b056f8f3d6b9 ("drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus.")
    Signed-off-by: Lucas De Marchi
    Cc: Rodrigo Vivi
    Cc: Anusha Srivatsa
    Cc: Jani Nikula
    Cc: Joonas Lahtinen
    Cc: David Airlie
    Cc: intel-gfx@lists.freedesktop.org
    Cc: dri-devel@lists.freedesktop.org
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Thomas Gleixner
    Cc: x86@kernel.org
    Cc: # v4.13+ 0890540e21cf drm/i915: add GT number to intel_device_info
    Cc: # v4.13+ 41693fd52373 drm/i915/kbl: Change a KBL pci id to GT2 from GT1.5
    Cc: # v4.13+
    Reviewed-by: Rodrigo Vivi
    Acked-by: Jani Nikula
    Acked-by: Ingo Molnar
    Signed-off-by: Rodrigo Vivi
    Link: https://patchwork.freedesktop.org/patch/msgid/20171213200425.2954-1-lucas.demarchi@intel.com
    Signed-off-by: Greg Kroah-Hartman

    Lucas De Marchi
     
  • commit 41693fd5237397d3c61b311af0fda1f6f39297c2 upstream.

    See Mesa commit 9c588ff

    Cc: Matt Turner
    Cc: Rodrigo Vivi
    Signed-off-by: Anuj Phogat
    Reviewed-by: Rodrigo Vivi
    Signed-off-by: Rodrigo Vivi
    Link: https://patchwork.freedesktop.org/patch/msgid/20170920203126.1323-1-anuj.phogat@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Anuj Phogat
     
  • commit 0890540e21cf1156b4cf960a4c1c734db4e816f9 upstream.

    Up to Coffeelake we could deduce this GT number from the device ID.
    This doesn't seem to be the case anymore. This change reorders pciids
    per GT and adds a gt field to intel_device_info. We set this field on
    the following platforms :

    - SNB/IVB/HSW/BDW/SKL/KBL/CFL/CNL

    Before & After :

    $ modinfo drivers/gpu/drm/i915/i915.ko | grep ^alias | wc -l
    209

    v2: Add SNB & IVB (Chris)

    v3: Fix compilation error in early-quirks (Lionel)

    v4: Fix inconsistency between FEATURE/PLATFORM macros (Ville)

    Signed-off-by: Lionel Landwerlin
    Reviewed-by: Chris Wilson
    Link: https://patchwork.freedesktop.org/patch/msgid/20170830161208.29221-2-lionel.g.landwerlin@intel.com
    Signed-off-by: Greg Kroah-Hartman

    Lionel Landwerlin
     

05 Dec, 2017

1 commit

  • commit 9271c0ca573e02a360b636ecd8cb408852f4e9f6 upstream.

    Apparently some sinks look at the YQ bits even when receiving RGB,
    and they get somehow confused when they see a non-zero YQ value.
    So we can't just blindly follow CEA-861-F and set YQ to match the
    RGB range.

    Unfortunately there is no good way to tell whether the sink
    designer claims to have read CEA-861-F. The CEA extension block
    revision number has generally been stuck at 3 since forever,
    and even a very recently manufactured sink might be based on
    an old design so the manufacturing date doesn't seem like
    something we can use. In lieu of better information let's
    follow CEA-861-F only for HDMI 2.0 sinks, since HDMI 2.0 is
    based on CEA-861-F. For HDMI 1.x sinks we'll always set YQ=0.

    The alternative would of course be to always set YQ=0. And if
    we ever encounter a HDMI 2.0+ sink with this bug that's what
    we'll probably have to do.

    Cc: Jani Nikula
    Cc: Eric Anholt
    Cc: Neil Kownacki
    Reported-by: Neil Kownacki
    Tested-by: Neil Kownacki
    Fixes: fcc8a22cc905 ("drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101639
    Signed-off-by: Ville Syrjälä
    Link: https://patchwork.freedesktop.org/patch/msgid/20171108152504.12596-1-ville.syrjala@linux.intel.com
    Acked-by: Eric Anholt
    Signed-off-by: Greg Kroah-Hartman

    Ville Syrjälä
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Sep, 2017

1 commit

  • Allow interval trees to quickly check for overlaps to avoid unnecesary
    tree lookups in interval_tree_iter_first().

    As of this patch, all interval tree flavors will require using a
    'rb_root_cached' such that we can have the leftmost node easily
    available. While most users will make use of this feature, those with
    special functions (in addition to the generic insert, delete, search
    calls) will avoid using the cached option as they can do funky things
    with insertions -- for example, vma_interval_tree_insert_after().

    [jglisse@redhat.com: fix deadlock from typo vm_lock_anon_vma()]
    Link: http://lkml.kernel.org/r/20170808225719.20723-1-jglisse@redhat.com
    Link: http://lkml.kernel.org/r/20170719014603.19029-12-dave@stgolabs.net
    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Jérôme Glisse
    Acked-by: Christian König
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Doug Ledford
    Acked-by: Michael S. Tsirkin
    Cc: David Airlie
    Cc: Jason Wang
    Cc: Christian Benvenuti
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     

29 Aug, 2017

3 commits

  • It is useful in certain circumstances to know when the fence is replaced
    in a syncobj. Specifically, it may be useful to know when the fence
    goes from NULL to something valid. This does make syncobj_replace_fence
    a little more expensive because it has to take a lock but, in the common
    case where there is no callback list, it spends a very short amount of
    time inside the lock.

    v2:
    - Don't lock in drm_syncobj_fence_get. We only really need to lock
    around fence_replace to make the callback work.
    v3:
    - Fix the cb_list comment to make kbuild happy

    Signed-off-by: Jason Ekstrand
    Signed-off-by: Dave Airlie

    Jason Ekstrand
     
  • The atomic exchange operation in drm_syncobj_replace_fence is sufficient
    for the case where it races with itself. However, if you have a race
    between a replace_fence and dma_fence_get(syncobj->fence), you may end
    up with the entire replace_fence happening between the point in time
    where the one thread gets the syncobj->fence pointer and when it calls
    dma_fence_get() on it. If this happens, then the reference may be
    dropped before we get a chance to get a new one. The new helper uses
    dma_fence_get_rcu_safe to get rid of the race.

    This is also needed because it allows us to do a bit more than just get
    a reference in drm_syncobj_fence_get should we wish to do so.

    v2:
    - RCU isn't that scary
    - Call rcu_read_lock/unlock
    - Don't rename fence to _fence
    - Make the helper static inline

    Signed-off-by: Jason Ekstrand
    Acked-by: Christian König (v1)
    Signed-off-by: Dave Airlie

    Jason Ekstrand
     
  • The function has far more in common with drm_syncobj_find than with
    any in the get/put functions.

    Signed-off-by: Jason Ekstrand
    Acked-by: Christian König (v1)
    Signed-off-by: Dave Airlie

    Jason Ekstrand
     

21 Aug, 2017

1 commit

  • More changes for 4.14. Highlights:
    - command submission overhead improvements
    - Huge page support for vega10
    - physical mode support for mjpeg for asics that don't support UVD vm
    - improve ttm_mem_type_manager_func debug
    - misc ttm fixes, cleanups
    - misc gpuvm cleanups

    * 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux: (26 commits)
    drm/ttm: use reservation_object_trylock in ttm_bo_individualize_resv v2
    drm/amdgpu: fix vega10 graphic hang issue in S3 test
    drm/amdgpu: bump version for support of UVD MJPEG decode
    drm/amdgpu: add MJPEG check for UVD physical mode msg buffer
    drm/ttm: Fix accounting error when fail to get pages for pool
    drm/amd/amdgpu: expose fragment size as module parameter (v2)
    drm/amd/amdgpu: store fragment_size in vm_manager
    drm/amdgpu: rename VM invalidated to moved
    drm/amdgpu: separate bo_va structure
    drm/amdgpu: drop the extra VM huge page flag v2
    drm/amdgpu: remove superflous amdgpu_bo_kmap in the VM
    drm/amdgpu: cleanup static CSA handling
    drm/amdgpu: SHADOW and VRAM_CONTIGUOUS flags shouldn't be used by userspace
    drm/amdgpu: save list length when fence is signaled
    drm/amdgpu: move vram usage tracking into the vram manager v2
    drm/amdgpu: move gtt usage tracking into the gtt manager v2
    drm/amdgpu: move debug print into the MM managers
    drm/amdgpu: fix incorrect use of the lru_lock
    drm/radeon: fix incorrect use of the lru_lock
    drm/ttm: make ttm_mem_type_manager_func debug more useful
    ...

    Dave Airlie
     

18 Aug, 2017

2 commits


17 Aug, 2017

1 commit

  • UAPI Changes:
    - vc4: Allow userspace to dictate rendering order in submit_cl ioctl (Eric)

    Cross-subsystem Changes:
    - vboxvideo: One of Cihangir's patches applies to vboxvideo which is maintained
    in staging

    Core Changes:
    - atomic_legacy_backoff is officially killed (Daniel)
    - Extract drm_device.h (Daniel)
    - Unregister drm device on unplug (Daniel)
    - Rename deprecated drm_*_(un)?reference functions to drm_*_{get|put} (Cihangir)

    Driver Changes:
    - vc4: Error/destroy path cleanups, log level demotion, edid leak (Eric)
    - various: Make various drm_*_funcs structs const (Bhumika)
    - tinydrm: add support for LEGO MINDSTORMS EV3 LCD (David)
    - various: Second half of .dumb_{map_offset|destroy} defaults set (Noralf)

    Cc: Daniel Vetter
    Cc: Eric Anholt
    Cc: Bhumika Goyal
    Cc: Cihangir Akturk
    Cc: David Lechner
    Cc: Noralf Trønnes

    * tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc: (50 commits)
    drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()
    drm/virtio: Use the drm_driver.dumb_destroy default
    drm/bochs: Use the drm_driver.dumb_destroy default
    drm/mgag200: Use the drm_driver.dumb_destroy default
    drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults
    drm/msm: Use the drm_driver.dumb_destroy default
    drm/ast: Use the drm_driver.dumb_destroy default
    drm/qxl: Use the drm_driver.dumb_destroy default
    drm/udl: Use the drm_driver.dumb_destroy default
    drm/cirrus: Use the drm_driver.dumb_destroy default
    drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults
    drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults
    drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults
    drm/meson: Use .dumb_map_offset and .dumb_destroy defaults
    drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults
    drm/vc4: Continue the switch to drm_*_put() helpers
    drm/vc4: Fix leak of HDMI EDID
    dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly v2
    dma-buf: add reservation_object_copy_fences (v2)
    drm/tinydrm: add support for LEGO MINDSTORMS EV3 LCD
    ...

    Dave Airlie