25 Dec, 2016

1 commit


13 Dec, 2016

1 commit

  • This pull request brings in VEC (TV-out) support for vc4, along with a
    pageflipping race fix.

    * tag 'drm-vc4-next-2016-12-09' of https://github.com/anholt/linux:
    drm/vc4: Don't use drm_put_dev
    drm/vc4: Document VEC DT binding
    drm/vc4: Add support for the VEC (Video Encoder) IP
    drm: Add TV connector states to drm_connector_state
    drm: Turn DRM_MODE_SUBCONNECTOR_xx definitions into an enum
    drm/vc4: Fix ->clock_select setting for the VEC encoder
    drm/vc4: Fix race between page flip completion event and clean-up

    Dave Airlie
     

10 Dec, 2016

1 commit

  • Some generic TV connector properties are exposed in drm_mode_config, but
    they are currently handled independently in each DRM encoder driver.

    Extend the drm_connector_state to store TV related states, and modify the
    drm_atomic_connector_{set,get}_property() helpers to fill the connector
    state accordingly.

    Each driver is then responsible for checking and applying the new config
    in its ->atomic_mode_{check,set}() operations.

    Signed-off-by: Boris Brezillon
    Reviewed-by: Daniel Vetter
    Signed-off-by: Eric Anholt

    Boris Brezillon
     

09 Dec, 2016

1 commit

  • Another pile of misc stuff, final one for 4.10. If there's some serious
    bugfix still I'll send you a pull for drm-misc-next-fixes (like we do with
    intel), otherwise this is it and next pull next year for 4.11.

    Most interesting bits are probably Chris' fb helper fixes against mst
    hotplug oopses.

    * tag 'drm-misc-next-2016-12-08' of git://anongit.freedesktop.org/git/drm-misc: (22 commits)
    drm: Take ownership of the dmabuf->obj when exporting
    drm: Allow CAP_PRIME on !MODESET
    drm/fence: add drm_crtc_create_fence()
    drm/bridge: analogix: Don't return -EINVAL when panel doesn't support PSR
    drm/atomic: doc: remove old comment about nonblocking commits
    drm: Don't block the kworker waiting for mode_config.mutex in output_poll()
    drm: Return -ENOTSUPP when called for KMS cap with a non-KMS driver
    drm/amdgpu: don't add files at control minor debugfs directory
    drm: allow changing DPMS mode
    drm/qxl: fix use of uninitialized variable
    drm/qxl: Don't register debugfs for control minors
    drm/radeon: don't add files at control minor debugfs directory
    drm/vmwgfx: Switch to mode_cmd2
    drm/vgem: Use ww_mutex_(un)lock even with a NULL context
    drm: Make the connector .detect() callback optional
    drm/bridge: tc358767: don't warn if display side ASSR enable fails
    drm: Initialise drm_mm.head_node.allocated
    drm: Fix locking cargo-cult in encoder/plane init/cleanup
    drm/doc: Fix indenting in drm_modeset_lock.c comment
    drm: Protect fb_helper list manipulation with a mutex
    ...

    Dave Airlie
     

08 Dec, 2016

1 commit

  • drm_universal_plane_init() and drm_plane_init() take "unsigned long
    possible_crtcs" parameter, but then stuff it into uint32_t. Change the
    parameter to uint32_t.

    Signed-off-by: Tomi Valkeinen
    Cc: Ville Syrjälä
    Reviewed-by: Laurent Pinchart
    Reviewed-by: Ville Syrjälä

    Tomi Valkeinen
     

06 Dec, 2016

1 commit


01 Dec, 2016

1 commit

  • Many drivers (21 to be exact) create connectors that are always
    connected (for instance to an LVDS or DSI panel). Instead of forcing
    them to implement a dummy .detect() handler, make the callback optional
    and consider the connector as always connected in that case.

    Reviewed-by: Alex Deucher
    Acked-by: Maxime Ripard
    Acked-by: Jyri Sarha
    Acked-by: Jani Nikula
    Acked-by: Philipp Zabel
    Acked-by: Vincent Abriou
    Acked-by: Alexey Brodkin
    Signed-off-by: Laurent Pinchart
    [seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c]
    Signed-off-by: Sean Paul

    Laurent Pinchart
     

30 Nov, 2016

3 commits

  • Big thing is that drm-misc is now officially a group maintainer/committer
    model thing, with MAINTAINERS suitably updated. Otherwise just the usual
    pile of misc things all over, nothing that stands out this time around.

    * tag 'drm-misc-next-2016-11-29' of git://anongit.freedesktop.org/git/drm-misc: (33 commits)
    drm: Introduce drm_framebuffer_assign()
    drm/bridge: adv7511: Enable the audio data and clock pads on adv7533
    drm/bridge: adv7511: Add Audio support
    drm/edid: Consider alternate cea timings to be the same VIC
    drm/atomic: Constify drm_atomic_crtc_needs_modeset()
    drm: bridge: dw-hdmi: add ASoC dependency
    drm: Fix shift operations for drm_fb_helper::drm_target_preferred()
    drm: Avoid NULL dereference for DRM_LEGACY debug message
    drm: Use u64_to_user_ptr() helper for blob ioctls
    drm: Fix conflicting macro parameter in drm_mm_for_each_node_in_range()
    drm: Fixup kernel doc for driver->gem_create_object
    drm/hisilicon/hibmc: mark PM functions __maybe_unused
    drm/hisilicon/hibmc: Checking for NULL instead of IS_ERR()
    drm: bridge: add DesignWare HDMI I2S audio support
    drm: Check against color expansion in drm_mm_reserve_node()
    drm: Define drm_mm_for_each_node_in_range()
    drm/doc: Fix links in drm_property.c
    MAINTAINERS: Add link to drm-misc documentation
    vgaarb: use valid dev pointer in vgaarb_info()
    drm/atomic: Unconfuse the old_state mess in commmit_tail
    ...

    Dave Airlie
     
  • Final 4.10 updates:

    - fine-tune fb flushing and tracking (Chris Wilson)
    - refactor state check dumper code for more conciseness (Tvrtko)
    - roll out dev_priv all over the place (Tvrkto)
    - finally remove __i915__ magic macro (Tvrtko)
    - more gvt bugfixes (Zhenyu&team)
    - better opregion CADL handling (Jani)
    - refactor/clean up wm programming (Maarten)
    - gpu scheduler + priority boosting for flips as first user (Chris
    Wilson)
    - make fbc use more atomic (Paulo)
    - initial kvm-gvt framework, but not yet complete (Zhenyu&team)

    * tag 'drm-intel-next-2016-11-21' of git://anongit.freedesktop.org/git/drm-intel: (127 commits)
    drm/i915: Update DRIVER_DATE to 20161121
    drm/i915: Skip final clflush if LLC is coherent
    drm/i915: Always flush the dirty CPU cache when pinning the scanout
    drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error
    drm/i915: Check that each request phase is completed before retiring
    drm/i915: i915_pages_create_for_stolen should return err ptr
    drm/i915: Enable support for nonblocking modeset
    drm/i915: Be more careful to drop the GT wakeref
    drm/i915: Move frontbuffer CS write tracking from ggtt vma to object
    drm/i915: Only dump dp_m2_n2 configuration when drrs is used
    drm/i915: don't leak global_timeline
    drm/i915: add i915_address_space_fini
    drm/i915: Add a few more sanity checks for stolen handling
    drm/i915: Waterproof verification of gen9 forcewake table ranges
    drm/i915: Introduce enableddisabled helper
    drm/i915: Only dump possible panel fitter config for the platform
    drm/i915: Only dump scaler config where supported
    drm/i915: Compact a few pipe config debug lines
    drm/i915: Don't log pipe config kernel pointer and duplicated pipe name
    drm/i915: Dump FDI config only where applicable
    ...

    Dave Airlie
     
  • drm/virtio: fix busid in a different way, allocate more vbufs.
    drm/qxl: various bugfixes and cleanups,

    * tag 'drm-qemu-20161121' of git://git.kraxel.org/linux: (224 commits)
    drm/virtio: allocate some extra bufs
    qxl: Allow resolution which are not multiple of 8
    qxl: Don't notify userspace when monitors config is unchanged
    qxl: Remove qxl_bo_init() return value
    qxl: Call qxl_gem_{init, fini}
    qxl: Add missing '\n' to qxl_io_log() call
    qxl: Remove unused prototype
    qxl: Mark some internal functions as static
    Revert "drm: virtio: reinstate drm_virtio_set_busid()"
    drm/virtio: fix busid regression
    drm: re-export drm_dev_set_unique
    Linux 4.9-rc5
    gp8psk: Fix DVB frontend attach
    gp8psk: fix gp8psk_usb_in_op() logic
    dvb-usb: move data_mutex to struct dvb_usb_device
    iio: maxim_thermocouple: detect invalid storage size in read()
    aoe: fix crash in page count manipulation
    lightnvm: invalid offset calculation for lba_shift
    Kbuild: enable -Wmaybe-uninitialized warnings by default
    pcmcia: fix return value of soc_pcmcia_regulator_set
    ...

    Dave Airlie
     

29 Nov, 2016

1 commit

  • In a couple of places currently, and with the intent to add more, we
    update a pointer to a framebuffer to hold a new fb reference (evicting
    the old).

    Signed-off-by: Chris Wilson
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161125153231.13255-2-chris@chris-wilson.co.uk

    Chris Wilson
     

28 Nov, 2016

2 commits

  • drm_atomic_crtc_needs_modeset() doesn't change the passed in
    crtc state, so pass it as const.

    Signed-off-by: Ville Syrjälä
    Link: http://patchwork.freedesktop.org/patch/msgid/1480009622-28127-1-git-send-email-ville.syrjala@linux.intel.com
    Reviewed-by: Jani Nikula

    Ville Syrjälä
     
  • start is being used as both a macro parameter and as a member of struct
    drm_mm_node (node->start). This causes a conflict as cpp then tries to
    replace node->start with the passed in string for "start". Work just
    fine so long as you also happened to using local variables called start!

    Fixes: 522e85dd8677 ("drm: Define drm_mm_for_each_node_in_range()")
    Signed-off-by: Chris Wilson
    Cc: Joonas Lahtinen
    Reviewed-by: Christian König .
    [danvet: Fixup kerneldoc.]
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161127111623.11124-1-chris@chris-wilson.co.uk

    Chris Wilson
     

25 Nov, 2016

1 commit


24 Nov, 2016

1 commit

  • Some clients would like to iterate over every node within a certain
    range. Make a nice little macro for them to hide the mixing of the
    rbtree search and linear walk.

    v2: Blurb

    Signed-off-by: Chris Wilson
    Cc: Daniel Vetter
    Cc: dri-devel@lists.freedesktop.org
    Reviewed-by: Joonas Lahtinen
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161123141118.23876-1-chris@chris-wilson.co.uk

    Chris Wilson
     

22 Nov, 2016

2 commits

  • I totally butcherd the job on typing the kernel-doc for these, and no
    one realized. Noticed by Russell. Maarten has a more complete approach
    to this confusion, by making it more explicit what the new/old state
    is, instead of this magic switching behaviour.

    v2:
    - Liviu pointed out that wait_for_fences is even more magic. Leave
    that as @state, and document @pre_swap better.
    - While at it, patch in header for the reference section.
    - Fix spelling issues Russell noticed.

    v3: Fix up the @pre_swap note (Liviu): Also s/synchronous/blocking/,
    since async flip is something else than non-blocking.

    Cc: Liviu Dudau
    Reported-by: Russell King - ARM Linux
    Cc: Russell King - ARM Linux
    Fixes: 9f2a7950e77a ("drm/atomic-helper: nonblocking commit support")
    Cc: Gustavo Padovan
    Cc: Maarten Lankhorst
    Cc: Tomeu Vizoso
    Cc: Daniel Stone
    Reviewed-by: Liviu Dudau
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161121171802.24147-1-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Cleanup the debugfs entries created by
    commit 6559c901cb48: drm/atomic: add debugfs file to dump out atomic state
    when the driver's minor gets un-registered. Without it, DRM drivers
    compiled as modules cannot be rmmod-ed and modprobed again.

    Tested-by: Brian Starkey
    Signed-off-by: Liviu Dudau
    Signed-off-by: Sean Paul
    Link: http://patchwork.freedesktop.org/patch/msgid/20161117114129.2627-1-Liviu.Dudau@arm.com
    Fixes: 6559c901cb48 ("drm/atomic: add debugfs file to dump out atomic state")

    Liviu Dudau
     

17 Nov, 2016

2 commits

  • Tvrtko needs

    commit b3c11ac267d461d3d597967164ff7278a919a39f
    Author: Eric Engestrom
    Date: Sat Nov 12 01:12:56 2016 +0000

    drm: move allocation out of drm_get_format_name()

    to be able to apply his patches without conflicts.

    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • It has been suggested that having per-plane modifiers is making life
    more difficult for userspace, so let's just retire modifier[1-3] and
    use modifier[0] to apply to the entire framebuffer.

    Obviosuly this means that if individual planes need different tiling
    layouts and whatnot we will need a new modifier for each combination
    of planes with different tiling layouts.

    For a bit of extra backwards compatilbilty the kernel will allow
    non-zero modifier[1+] but it require that they will match modifier[0].
    This in case there's existing userspace out there that sets
    modifier[1+] to something non-zero with planar formats.

    Mostly a cocci job, with a bit of manual stuff mixed in.

    @@
    struct drm_framebuffer *fb;
    expression E;
    @@
    - fb->modifier[E]
    + fb->modifier

    @@
    struct drm_framebuffer fb;
    expression E;
    @@
    - fb.modifier[E]
    + fb.modifier

    Cc: Kristian Høgsberg
    Cc: Ben Widawsky
    Cc: Rob Clark
    Cc: Daniel Vetter
    Cc: Tomeu Vizoso
    Cc: dczaplejewicz@collabora.co.uk
    Suggested-by: Kristian Høgsberg
    Acked-by: Ben Widawsky
    Acked-by: Daniel Stone
    Acked-by: Rob Clark
    Signed-off-by: Ville Syrjälä
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/1479295996-26246-1-git-send-email-ville.syrjala@linux.intel.com

    Ville Syrjälä
     

16 Nov, 2016

6 commits

  • Support DRM out-fences by creating a sync_file with a fence for each CRTC
    that sets the OUT_FENCE_PTR property.

    We use the out_fence pointer received in the OUT_FENCE_PTR prop to send
    the sync_file fd back to userspace.

    The sync_file and fd are allocated/created before commit, but the
    fd_install operation only happens after we know that commit succeed.

    v2: Comment by Rob Clark:
    - Squash commit that adds DRM_MODE_ATOMIC_OUT_FENCE flag here.

    Comment by Daniel Vetter:
    - Add clean up code for out_fences

    v3: Comments by Daniel Vetter:
    - create DRM_MODE_ATOMIC_EVENT_MASK
    - userspace should fill out_fences_ptr with the crtc_ids for which
    it wants fences back.

    v4: Create OUT_FENCE_PTR properties and remove old approach.

    v5: Comments by Brian Starkey:
    - Remove extra fence_get() in atomic_ioctl()
    - Check ret before iterating on the crtc_state
    - check ret before fd_install
    - set fence_state to NULL at the beginning
    - check fence_state->out_fence_ptr before put_user()
    - change order of fput() and put_unused_fd() on failure

    - Add access_ok() check to the out_fence_ptr received
    - Rebase after fence -> dma_fence rename
    - Store out_fence_ptr in the drm_atomic_state
    - Split crtc_setup_out_fence()
    - return -1 as out_fence with TEST_ONLY flag

    v6: Comments by Daniel Vetter
    - Add prepare/unprepare_crtc_signaling()
    - move struct drm_out_fence_state to drm_atomic.c
    - mark get_crtc_fence() as static

    Comments by Brian Starkey
    - proper set fence_ptr fence_state array
    - isolate fence_idx increment

    - improve error handling

    v7: Comments by Daniel Vetter
    - remove prefix from internal functions
    - make out_fence_ptr an s64 pointer
    - degrade DRM_INFO to DRM_DEBUG_ATOMIC when put_user fail
    - fix doc issues
    - filter out OUT_FENCE_PTR == NULL and do not fail in this case
    - add complete_crtc_signalling()
    - krealloc fence_state on demand

    Comment by Brian Starkey
    - remove unused crtc_state arg from get_out_fence()

    v8: Comment by Brian Starkey
    - cancel events before check for !fence_state
    - convert a few lefovers u64 types for out_fence_ptr
    - fix memleak by assign fence_state earlier after realloc
    - proper accout num_fences in case of error

    v9: Comment by Brian Starkey
    - memset last position of fence_state after krealloc
    Comments by Sean Paul
    - pass install_fds in complete_crtc_signaling() instead of ret

    - put_user(-1, fence_ptr) when decoding props

    v10: Comment by Brian Starkey
    - remove unneeded num_fences increment on error path
    - kfree fence_state after installing fences fd

    v11: rebase against latest drm-misc

    v12: rebase again against latest drm-misc

    Signed-off-by: Gustavo Padovan
    Reviewed-by: Brian Starkey (v10)
    Reviewed-by: Sean Paul
    Tested-by: Robert Foss (v10)
    [danvet: Appease checkpatch.]
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/1479301221-13056-1-git-send-email-gustavo@padovan.org

    Gustavo Padovan
     
  • Create one timeline context for each CRTC to be able to handle out-fences
    and signal them. It adds a few members to struct drm_crtc: fence_context,
    where we store the context we get from fence_context_alloc(), the
    fence seqno and the fence lock, that we pass in fence_init() to be
    used by the fence.

    v2: Comment by Daniel Stone:
    - add BUG_ON() to fence_to_crtc() macro

    v3: Comment by Ville Syrjälä
    - Use more meaningful name as crtc timeline name

    v4: Comments by Brian Starkey
    - Use even more meaninful name for the crtc timeline
    - add doc for timeline_name
    Comment by Daniel Vetter
    - use in-line style for comments

    - rebase after fence -> dma_fence rename

    v5: Comment by Daniel Vetter
    - Add doc for drm_crtc_fence_ops

    v6: Comment by Chris Wilson
    - Move fence_to_crtc to drm_crtc.c
    - Move export of drm_crtc_fence_ops to drm_crtc_internal.h

    - rebase against latest drm-misc

    Signed-off-by: Gustavo Padovan
    Reviewed-by: Daniel Vetter (v5)
    Reviewed-by: Sean Paul (v5)
    Tested-by: Robert Foss (v5)
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/1479220628-10204-1-git-send-email-gustavo@padovan.org

    Gustavo Padovan
     
  • There is now a new property called IN_FENCE_FD attached to every plane
    state that receives sync_file fds from userspace via the atomic commit
    IOCTL.

    The fd is then translated to a fence (that may be a fence_array
    subclass or just a normal fence) and then used by DRM to fence_wait() for
    all fences in the sync_file to signal. So it only commits when all
    framebuffers are ready to scanout.

    v2: Comments by Daniel Vetter:
    - remove set state->fence = NULL in destroy phase
    - accept fence -1 as valid and just return 0
    - do not call fence_get() - sync_file_fences_get() already calls it
    - fence_put() if state->fence is already set, in case userspace
    set the property more than once.

    v3: WARN_ON if fence is set but state has no FB

    v4: Comment from Maarten Lankhorst
    - allow set fence with no related fb

    v5: rename FENCE_FD to IN_FENCE_FD

    v6: Comments by Daniel Vetter:
    - rename plane_state->in_fence back to "fence"
    - re-introduce WARN_ON if fence set but no fb

    - rebase after fence -> dma_fence rename

    v7: Comments by Brian Starkey
    - set state->fence to NULL when duplicating the state
    - fail if IN_FENCE_FD was already set

    v8: rebase against latest drm-misc

    Signed-off-by: Gustavo Padovan
    Reviewed-by: Brian Starkey
    Reviewed-by: Sean Paul
    Tested-by: Robert Foss
    [danvet: Rebase onto extracted drm_mode_config.[hc].]
    Signed-off-by: Daniel Vetter

    Gustavo Padovan
     
  • - Drop extern for functions, it's noise.
    - Move&consolidate drm.ko internal parts into drm-internal.h.

    Reviewed-by: Alex Deucher
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-6-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Only remaining use was in amdgpu, and trivial to convert over to
    drm_crtc_vblank_* variants.

    Cc: Alex Deucher
    Cc: Christian König
    Reviewed-by: Alex Deucher
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114090255.31595-5-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Now that all drivers are switched over to drm_crtc_vblank_on/off we
    can relegate pre/post_modeset to the purely drm_irq.c internal role of
    supporting old ums userspace.

    As usual switch to the drm_legacy_ prefix to make it clear this is
    for old drivers only.

    v2: Rebase on top of Thierry's s/int crtc/unsigned int pipe/ changes.

    Cc: Ben Skeggs
    Cc: Alex Deucher
    Reviewed-by: Alex Deucher
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

15 Nov, 2016

10 commits

  • Just noise.

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-11-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • And also put the overview section into the KMS Properties part of the
    docs, instead of randomly-placed within the helpers - this is part of
    the uabi.

    With this patch I think drm_crtc.[hc] is cleaned up and entirely
    documented.

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • And shuffle the kernel-doc structure a bit since drm_crtc.[hc] now
    only contains CRTC-related functions and structures.

    v2:
    - rebase onto drm-misc
    - don't forget to move drm_mode_config_cleanup.
    - move 2 internal decls under the right heading (Chris)

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • kerneldoc expects the comment next to definitions, otherwise it can't
    pick up exported vs. internal stuff.

    This fixes a warning from the doc build done with:

    $ make DOCBOOKS="" htmldocs

    Fixes: d8187177b0b1 ("drm: add helper for printing to log or seq_file")
    Cc: Rob Clark
    Cc: Sean Paul
    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-8-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Put the callback docs into struct drm_driver, and the small overview
    into a DOC comment.

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-7-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • Just cleans up what's there, still plenty missing.

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-6-daniel.vetter@ffwll.ch

    Daniel Vetter
     
  • I want to move dumb buffer documentation into the right vfuncs, and
    for that I first need to be able to pull that into kerneldoc without
    having to clean up all of drmP.h. Also, header-splitting is nice.

    While at it shuffle all the function declarations for drm_drv.c into
    the right spots, and drop the kerneldoc for drm_minor_acquire/release
    since it's only used internally.

    v2: Keep all existing copyright notices (Chris).

    Reviewed-by: Chris Wilson
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Add missing forward declaration for struct drm_plane and drm_plane_state,
    which causes the following warning in the VC4 driver (can be replicated
    by building using bcm2835_defconfig):

    In file included from drivers/gpu/drm/vc4/vc4_drv.c:18:0:
    include/drm/drm_fb_cma_helper.h:45:13: warning: ‘struct drm_plane_state’ declared inside parameter list will not be visible outside of this definition or declaration
    struct drm_plane_state *state);
    ^~~~~~~~~~~~~~~
    include/drm/drm_fb_cma_helper.h:44:34: warning: ‘struct drm_plane’ declared inside parameter list will not be visible outside of this definition or declaration
    int drm_fb_cma_prepare_fb(struct drm_plane *plane,

    Signed-off-by: Marek Vasut
    Cc: Daniel Vetter
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161115105529.3227-1-marex@denx.de

    Marek Vasut
     
  • We still need it, for virtio-gpu for example.
    Partial revert of commit a742946a1ba57e24e8be205ea87224c05b38c380.

    Signed-off-by: Gerd Hoffmann

    Gerd Hoffmann
     
  • kbuild spotted this error, with drm/msm patches that add a new
    modeset-lock in the driver and driver built as a module:

    ERROR: "crtc_ww_class" [drivers/gpu/drm/msm/msm.ko] undefined!

    Really the only reason for crtc_ww_class not being internal to
    drm_modeset_lock.c is that drm_modeset_lock_init() was static-inline
    (for no particularly good reason).

    Fix that, and move crtc_ww_class into drm_modeset_lock.c.

    Signed-off-by: Rob Clark
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/1479163257-18703-1-git-send-email-robdclark@gmail.com

    Rob Clark
     

14 Nov, 2016

2 commits

  • Add new drm_fb_cma_prepare_fb() helper function extracted from the
    imx-drm driver. This function checks if the plane has DMABUF attached
    to it, extracts the exclusive fence from it and attaches it to the
    plane state for the atomic helper to wait on it.

    Signed-off-by: Marek Vasut
    Cc: Daniel Vetter
    Cc: Lucas Stach
    Reviewed-by: Lucas Stach
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161114100732.3446-1-marex@denx.de

    Marek Vasut
     
  • Add additional members fb_debug_enter and fb_debug_leave to helper
    define. They are shared by all fb_ops implementations.

    Suggested-by: Daniel Vetter
    Signed-off-by: Stefan Christ
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/1479078208-25221-3-git-send-email-contact@stefanchrist.eu

    Stefan Christ
     

12 Nov, 2016

1 commit

  • The function's behaviour was changed in 90844f00049e, without changing
    its signature, causing people to keep using it the old way without
    realising they were now leaking memory.
    Rob Clark also noticed it was also allocating GFP_KERNEL memory in
    atomic contexts, breaking them.

    Instead of having to allocate GFP_ATOMIC memory and fixing the callers
    to make them cleanup the memory afterwards, let's change the function's
    signature by having the caller take care of the memory and passing it to
    the function.
    The new parameter is a single-field struct in order to enforce the size
    of its buffer and help callers to correctly manage their memory.

    Fixes: 90844f00049e ("drm: make drm_get_format_name thread-safe")
    Cc: Rob Clark
    Cc: Christian König
    Acked-by: Christian König
    Acked-by: Rob Clark
    Acked-by: Sinclair Yeh (vmwgfx)
    Reviewed-by: Jani Nikula
    Suggested-by: Ville Syrjälä
    Signed-off-by: Eric Engestrom
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161112011309.9799-1-eric@engestrom.ch

    Eric Engestrom
     

11 Nov, 2016

1 commit

  • - better atomic state debugging from Rob
    - fence prep from gustavo
    - sumits flushed out his backlog of pending dma-buf/fence patches from
    various people
    - drm_mm leak debugging plus trying to appease Kconfig (Chris)
    - a few misc things all over

    * tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel: (35 commits)
    drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT
    drm/i915: Restrict DRM_DEBUG_MM automatic selection
    drm: Restrict stackdepot usage to builtin drm.ko
    drm/msm: module param to dump state on error irq
    drm/msm/mdp5: add atomic_print_state support
    drm/atomic: add debugfs file to dump out atomic state
    drm/atomic: add new drm_debug bit to dump atomic state
    drm: add helpers to go from plane state to drm_rect
    drm: add helper for printing to log or seq_file
    drm: helper macros to print composite types
    reservation: revert "wait only with non-zero timeout specified (v3)" v2
    drm/ttm: fix ttm_bo_wait
    dma-buf/fence: revert "don't wait when specified timeout is zero" (v2)
    dma-buf/fence: make timeout handling in fence_default_wait consistent (v2)
    drm/amdgpu: add the interface of waiting multiple fences (v4)
    dma-buf: return index of the first signaled fence (v2)
    MAINTAINERS: update Sync File Framework files
    dma-buf/sw_sync: put fence reference from the fence creation
    dma-buf/sw_sync: mark sync_timeline_create() static
    drm: Add stackdepot include for DRM_DEBUG_MM
    ...

    Dave Airlie
     

09 Nov, 2016

1 commit

  • The only user was i915, which is now gone.

    Signed-off-by: Maarten Lankhorst
    Reviewed-by: Ville Syrjälä
    Acked-by: Dave Airlie #irc
    Cc: dri-devel@lists.freedesktop.org
    Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-9-git-send-email-maarten.lankhorst@linux.intel.com

    Maarten Lankhorst