Noralf Trønnes [Tue, 7 Mar 2017 20:49:22 +0000 (21:49 +0100)]
drm/msm: Remove msm_debugfs_cleanup()
Move the contents of msm_debugfs_cleanup() to msm_drm_uninit() to free
up the drm_driver->debugfs_cleanup callback. Also remove the
mdp_kms_funcs->debugfs_cleanup callback which has no users.
Tomeu Vizoso [Tue, 7 Mar 2017 20:35:11 +0000 (21:35 +0100)]
drm/dp: Add missing description to parameter
Gabriel Krisman reported these warnings when building the documentation:
./drivers/gpu/drm/drm_dp_helper.c:1165: warning: No description found
for parameter 'crtc'
./drivers/gpu/drm/drm_dp_helper.c:1166: warning: No description found
for parameter 'crtc'
Gerd Hoffmann [Wed, 1 Mar 2017 10:12:34 +0000 (11:12 +0100)]
qxl: fix qxl_conn_get_modes
Call qxl_add_monitors_config_modes() unconditionally. Do all sanity
checks in that function.
Fix sanity checks. monitors_config is the current monitor
configuration, whereas client_monitors_config is the configuration
requested by the spice client. So when filling the mode list, based on
the spice client request, we need to look at
client_monitors_config->count not monitors_config->count.
Gerd Hoffmann [Wed, 1 Mar 2017 10:12:33 +0000 (11:12 +0100)]
qxl: read monitors config at boot
Try to read the client monitors config at driver load time, even without
explicit notification. So in case that info was filled before the driver
loaded and we've missed the notifications because of that the settings
will still be used.
With that place we now have to take care to properly handle a empty client
monitors config, so we don't trip over an uninitialized client monitors
config.
Gerd Hoffmann [Wed, 1 Mar 2017 10:12:32 +0000 (11:12 +0100)]
qxl: limit monitor config read retries
When reading the monitor config fails, don't retry forever. If it fails
ten times in a row just give up to avoid the driver hangs. Also add a
small delay after each attempt, so the host has a chance to complete a
partial update.
Gerd Hoffmann [Wed, 1 Mar 2017 10:12:31 +0000 (11:12 +0100)]
qxl: drop mode_info.modes & related code.
very old qxl hardware revisions (predating qxl ksm support by a few
years) supported a fixed list of video modes only. The list is still
provided by the virtual hardware, for backward compatibility reasons.
The qxl kms driver never ever looks at it, except for dumping it to
the kernel log at load time in case debug logging is enabled. Drop
that pointless code.
drm: qxl: Don't alloc fbdev if emulation is not supported
If fbdev emulation is disabled, the QXL shutdown path will try to clean
a framebuffer that wasn't initialized, hitting the Oops below. The
problem is that even when FBDEV_EMULATION is disabled we allocate the
qfbdev strutucture, but we don't initialize it. The fix is to stop
allocating the memory, since it won't be used. This allows the existing
verification in the cleanup hook to do it's job preventing the oops.
Now that we don't allocate the unused fbdev structure, we need to be
careful when dereferencing it in the PM suspend hook.
Sean Paul [Mon, 6 Mar 2017 20:00:17 +0000 (15:00 -0500)]
drm: Fix compilation error when CONFIG_DEBUG_FS is undefined
This patch fixes the following compilation error when CONFIG_DEBUG_FS is not defined.
../drivers/gpu/drm/drm_dp_helper.c: In function ‘drm_dp_aux_crc_work’:
../drivers/gpu/drm/drm_dp_helper.c:1029:13: error: ‘struct drm_crtc’ has no member named ‘crc’
../drivers/gpu/drm/drm_dp_helper.c:1031:12: error: ‘struct drm_crtc’ has no member named ‘crc’
make[4]: *** [drivers/gpu/drm/drm_dp_helper.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Fixes: 79c1da7c3bf7 ("drm/dp: add helpers for capture of frame CRCs") Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Sean Paul <seanpaul@chromium.org> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Tomeu Vizoso [Fri, 3 Mar 2017 13:39:34 +0000 (14:39 +0100)]
drm/dp: add helpers for capture of frame CRCs
Adds helpers for starting and stopping capture of frame CRCs through the
DPCD. When capture is on, a worker waits for vblanks and retrieves the
frame CRC to put it in the queue on the CRTC that is using the
eDP connector, so it's passed to userspace.
v2: Reuse drm_crtc_wait_one_vblank
Update locking, as drm_crtc_add_crc_entry now takes the lock
v3: Don't call wake_up_interruptible directly, that's now done in
drm_crtc_add_crc_entry.
v4: Style fixes (Sean Paul)
Reworked retry of CRC reads (Sean Paul)
Flush worker after stopping CRC generationa (Sean Paul)
v5: Move back to make the retry explicitly once
v6: Set and use the drm_crtc backpointer (Sean Paul)
There are new iterator macros that annotate whether the new or old
state should be used. This is better than using a state that depends on
whether it's called before or after swap. For clarity, also rename the
variables from $obj_state to (old,new)_$obj_state as well.
drm/atomic: Convert get_existing_state callers to get_old/new_state, v4.
This is a straightforward conversion that converts all the users of
get_existing_state in atomic core to use get_old_state or get_new_state
Changes since v1:
- Fix using the wrong state in drm_atomic_helper_update_legacy_modeset_state.
Changes since v2:
- Use the correct state in disable_outputs()
Changes since v3:
- Rebase for link status training.
drm/atomic: Add macros to access existing old/new state, v2.
After atomic commit, these macros should be used in place of
get_existing_state. Also after commit get_xx_state should no longer
be used because it may not have the required locks.
The calls to drm_atomic_get_existing_$obj_state should no longer be
used, and converted over to these new calls.
Changes since v1:
- Expand commit message.
- Deprecate get_existing_*_state functions in the documentation.
drm/atomic: Make drm_atomic_plane_disabling easier to understand.
This function becomes a lot simpler when having passed both the old and
new state to it. Looking at all callers, it seems that old_plane_state
is never NULL so the check can be dropped.
drm/atomic: Fix atomic helpers to use the new iterator macros, v3.
There are new iterator macros that annotate whether the new or old
state should be used. This is better than using a state that depends on
whether it's called before or after swap. For clarity, also rename the
variables from $obj_state to (old,new)_$obj_state as well.
Changes since v1:
- Use old/new_*_state for variable names as much as possible. (pinchartl)
- Expand commit message.
Changes since v2:
- Rebase on top of link training patches.
- free -> cleanup (pinchartl)
The THC63LVDM83D is a transparent LVDS encoder. Unlike dumb LVDS
encoders it can be controlled through a few pins (power down, LVDS
swing, clock edge selection) and requires power supplies. However, on
several boards where the device is used neither the control pins nor the
power supply are controllable.
To avoid developing a separate device-specific driver add a
"thine,thc63lvdm83d" compatible entry to the lvds-encoder driver. This
will allow supporting many THC63LVDM83D-based boards easily, while
allowing future development of an thc63lvdm83d driver when needed
without breaking backward compatibility.
The ADV7123 is a transparent VGA DAC. Unlike dumb VGA DACs it can be
controlled through a power save pin, and requires a power supply.
However, on most boards where the device is used neither the power save
signal nor the power supply are controllable.
To avoid developing a separate device-specific driver add an
"adi,adv7123" compatible entry to the dumb-vga-dac driver. This will
allow supporting most ADV7123-based boards easily, while allowing future
development of an adv7123 driver when needed without breaking backward
compatibility.
The LVDS encoder driver is a DRM bridge driver that supports the
parallel to LVDS encoders that don't require any configuration. The
driver thus doesn't interact with the device, but creates an LVDS
connector for the panel and exposes its size and timing based on
information retrieved from DT.
drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++)
The video processing pipeline on the second output on the GE B850v3:
Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output
Each bridge has a dedicated flash containing firmware for supporting the
custom design. The result is that in this design neither the STDP4028
nor the STDP2690 behave as the stock bridges would. The compatible
strings include the suffix "-ge-b850v3-fw" to make it clear that the
driver is for the bridges with the firmware which is specific for the GE
B850v3.
The driver is powerless to control the video processing pipeline, as the
two bridges behaves as a single one. The driver is only needed for
telling the host about EDID / HPD, and for giving the host powers to ack
interrupts.
This driver adds one i2c_device for each bridge, but only one
drm_bridge. This design allows the creation of a functional connector
that is capable of reading EDID from the STDP2690 while handling
interrupts on the STDP4028.
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Martin Donnelly <martin.donnelly@ge.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Rob Herring <robh@kernel.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: David Airlie <airlied@linux.ie> Cc: Thierry Reding <treding@nvidia.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Enric Balletbo <enric.balletbo@collabora.com> Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/ad92919f2eaff2623a551aac94cf11ef948ff9ee.1488555615.git.peter.senna@collabora.com
Devicetree binding documentation for the second video output
of the GE B850v3:
STDP4028-ge-b850v3-fw bridges (LVDS-DP)
STDP2690-ge-b850v3-fw bridges (DP-DP++)
Added entry for MegaChips at:
Documentation/devicetree/bindings/vendor-prefixes.txt
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Martin Donnelly <martin.donnelly@ge.com> Cc: Javier Martinez Canillas <javier@dowhile0.org> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Rob Herring <robh@kernel.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/c2712336226c5170cfdc45103527fb2338d3d6cf.1488555615.git.peter.senna@collabora.com
Eric Anholt [Wed, 1 Mar 2017 18:56:02 +0000 (10:56 -0800)]
drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
If a CMA allocation failed, the partially constructed BO would be
unreferenced through the normal path, and we might choose to put it in
the BO cache. If we then reused it before it expired from the cache,
the kernel would OOPS.
Eric Anholt [Wed, 1 Mar 2017 18:56:01 +0000 (10:56 -0800)]
drm/vc4: Fulfill user BO creation requests from the kernel BO cache.
The from_cache flag was actually "the BO is invisible to userspace",
so we can repurpose it to just zero out a cached BO and return it to
userspace.
Improves wall time for a loop of 5 glsl-algebraic-add-add-1 by
-1.44989% +/- 0.862891% (n=28, 1 outlier removed from each that
appeared to be other system noise)
Note that there's an intel-gpu-tools test to check for the proper
zeroing behavior here, which we continue to pass.
Maxime Ripard [Tue, 28 Feb 2017 15:36:51 +0000 (16:36 +0100)]
drm/fb-helper: implement ioctl FBIO_WAITFORVSYNC
Implement legacy framebuffer ioctl FBIO_WAITFORVSYNC in the generic
framebuffer emulation driver. Legacy framebuffer users like non kms/drm
based OpenGL(ES)/EGL implementations may require the ioctl to
synchronize drawing or buffer flip for double buffering. It is tested on
the i.MX6.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Commit be7f735cd5ea ("drm: Rely on mode_config data for fb_helper
initialization") dropped the num_crtc argument. Update the
documentation to reflect that and prevent the kernel-doc warnings below:
./drivers/gpu/drm/drm_fb_cma_helper.c:557: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init'
./drivers/gpu/drm/drm_fb_cma_helper.c:558: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init'
Chris Zhong [Mon, 20 Feb 2017 08:02:22 +0000 (16:02 +0800)]
drm/rockchip/dsi: fix insufficient bandwidth of some panel
Set the lanes bps to 1 / 0.9 times of pclk, the margin is not enough
for some panel, it will cause the screen display is not normal, so
increases the badnwidth to 1 / 0.8.
Chris Zhong [Mon, 20 Feb 2017 08:02:18 +0000 (16:02 +0800)]
drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi
The vopb/vopl switch register of RK3399 mipi is different from RK3288,
the default setting for mipi dsi mode is different too, so add a
of_device_id structure to distinguish them, and make sure set the
correct mode before mipi phy init.
John Keeping [Fri, 24 Feb 2017 12:55:04 +0000 (12:55 +0000)]
drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
This ensures that the output resolution is known before fbcon loads.
mipi_dsi_host_register() is moved above dw_mipi_dsi_register() to
simplify error cleanup since the order of these operations does not
matter.
John Keeping [Fri, 24 Feb 2017 12:55:03 +0000 (12:55 +0000)]
drm/rockchip: vop: test for P{H,V}SYNC
When connected to the MIPI DSI output, we need to use N{H,V}SYNC for the
internal connection but these flags are meaningless for DSI panels.
Switch the test so that we do not set the P{H,V}SYNC bits unless the
mode requires it.
Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Mark Yao <mark.yao@rock-chips.com> Reviewed-by: Sean Paul <seanpaul@chromium.org>
[seanpaul resolved conflict using macros instead of hardcoded values] Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20170224125506.21533-21-john@metanate.com
The multiplication ratio for the PLL is required to be even due to the
use of a "by 2 pre-scaler". Currently we are likely to end up with an
odd multiplier even though there is an equivalent set of parameters with
an even multiplier.
For example, using the 324MHz bit rate with a reference clock of 24MHz
we end up with M = 27, N = 2 whereas the example in the PHY databook
gives M = 54, N = 4 for this bit rate and reference clock.
By walking down through the available multiplier instead of up we are
more likely to hit an even multiplier. With the above example we do now
get M = 54, N = 4 as given by the databook.
While doing this, change the loop limits to encode the actual limits on
the divisor, which are:
These values are specified as constant time periods but the PHY
configuration is in terms of the current lane byte clock so using
constant values guarantees that the timings will be outside the
specification with some display configurations.
Derive the necessary configuration from the byte clock in order to
ensure that the PHY configuration is correct.
John Keeping [Fri, 24 Feb 2017 12:54:57 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: ensure PHY is reset
Also don't power up the DSI host at this point since this is not
necessary in order to configure the PHY and we do so later when
selecting video or command mode.
John Keeping [Fri, 24 Feb 2017 12:54:56 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: fix escape clock rate
This clock rate is derived from the PHY PLL, so it should be calculated
dynamically. This calculation is the same as that used by the vendor
kernel and ensures that the escape clock runs at <20MHz as required by
the MIPI specification.
John Keeping [Fri, 24 Feb 2017 12:54:55 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: allow commands in panel_disable
Panel drivers may want to sent commands during the disable function, for
example MIPI_DCS_SET_DISPLAY_OFF before the video signal ends. In order
to send commands we need to write to registers, so pclk must be enabled.
While changing this, remove the unnecessary code after the panel
unprepare call which seems to be a workaround for a specific panel and
thus belongs in the panel driver.
John Keeping [Fri, 24 Feb 2017 12:54:54 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: prepare panel after phy init
Some panels need to be configured with commands sent over the MIPI link,
which they will do in the prepare hook. Call this after the PHY has
been initialized so that we are able to send commands to the panel.
John Keeping [Fri, 24 Feb 2017 12:54:53 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: don't assume buffer is aligned
By dereferencing the MIPI command buffer as a u32* we rely on it being
correctly aligned on ARM, but this may not be the case. Copy it into a
stack variable that will be correctly aligned.
John Keeping [Fri, 24 Feb 2017 12:54:52 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: only request HS clock when required
Requesting the HS clock from the PHY before we initialize it causes an
invalid signal to be sent out since the input clock is not yet
configured. The PHY databook suggests only asserting this signal when
performing HS transfers, so let's do that.
John Keeping [Fri, 24 Feb 2017 12:54:51 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: respect message flags
Instead of always sending commands in LP mode, respect the
MIPI_DSI_MSG_USE_LPM flag to decide how to send each message. Also
request acks if MIPI_DSI_MSG_REQ_ACK is set.
John Keeping [Fri, 24 Feb 2017 12:54:48 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: fix generic packet status check
We want to check that both the GEN_CMD_EMPTY and GEN_PLD_W_EMPTY bits
are set so we can't just check "val & mask" because that will be true if
either bit is set.
In a couple of places here we use "val" for the value that is about to
be written to a register but then reuse the same variable for the value
of a status register before we get around to writing it. Rename the
value to be written to so that we write the value we intend to and not
what we have just read from the status register.
John Keeping [Fri, 24 Feb 2017 12:54:44 +0000 (12:54 +0000)]
drm/rockchip: dw-mipi-dsi: don't configure hardware in mode_set for MIPI
With atomic modesetting the hardware will be powered off when the
mode_set function is called. We should configure the hardware in the
enable function, which is the atomic version of "commit" so let's use
the enable hook rather than commit while we're at it.
Manasi Navare [Fri, 16 Dec 2016 10:29:07 +0000 (12:29 +0200)]
drm/i915: Implement Link Rate fallback on Link training failure
If link training at a link rate optimal for a particular
mode fails during modeset's atomic commit phase, then we
let the modeset complete and then retry. We save the link rate
value at which link training failed, update the link status property
to "BAD" and use a lower link rate to prune the modes. It will redo
the modeset on the current mode at lower link rate or if the current
mode gets pruned due to lower link constraints then, it will send a
hotplug uevent for userspace to handle it.
This is also required to pass DP CTS tests 4.3.1.3, 4.3.1.4,
4.3.1.6.
v9:
* Use the trimmed max values of link rate/lane count based on
link train fallback (Daniel Vetter)
v8:
* Set link_status to BAD first and then call mode_valid (Jani Nikula)
v7:
Remove the redundant variable in previous patch itself
v6:
* Obtain link rate index from fallback_link_rate using
the helper intel_dp_link_rate_index (Jani Nikula)
* Include fallback within intel_dp_start_link_train (Jani Nikula)
v5:
* Move set link status to drm core (Daniel Vetter, Jani Nikula)
v4:
* Add fallback support for non DDI platforms too
* Set connector->link status inside set_link_status function
(Jani Nikula)
v3:
* Set link status property to BAd unconditionally (Jani Nikula)
* Dont use two separate variables link_train_failed and link_status
to indicate same thing (Jani Nikula)
v2:
* Squashed a few patches (Jani Nikula)
Acked-by: Tony Cheng <tony.cheng@amd.com> Acked-by: Harry Wentland <Harry.wentland@amd.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/d796cc0c2814d668a47ef43c464f9a4089d46d64.1481883920.git.jani.nikula@intel.com
Manasi Navare [Wed, 1 Mar 2017 14:45:10 +0000 (06:45 -0800)]
drm: Fix the kernel doc warning for drm_link_status
This fixes the kernel doc warning that was introduced in
the 'commit 40ee6fbef75fe6 ("drm: Add a new connector
atomic property for link status")'. Description has
been added for the enum values.
Noralf Trønnes [Thu, 26 Jan 2017 22:56:11 +0000 (23:56 +0100)]
drm/msm: Remove drm_debugfs_remove_files() calls
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so it's not necessary to call
drm_debugfs_remove_files(). Additionally it uses
debugfs_remove_recursive() to clean up the debugfs files, so no need
to do that.
Noralf Trønnes [Thu, 26 Jan 2017 22:56:21 +0000 (23:56 +0100)]
drm/i915: Remove i915_debugfs_unregister()
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to do this explicitly. Additionally it
uses debugfs_remove_recursive() to clean up the debugfs files,
so no need for adding fake drm_info_node entries.
Noralf Trønnes [Thu, 26 Jan 2017 22:56:12 +0000 (23:56 +0100)]
drm/nouveau: Remove nouveau_drm_debugfs_cleanup()
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so the drm_driver.debugfs_cleanup callback is not
needed. Additionally it uses debugfs_remove_recursive() to clean
up the debugfs files, so no need for adding fake drm_info_node
entries.
Noralf Trønnes [Thu, 26 Jan 2017 22:56:07 +0000 (23:56 +0100)]
drm/armada: Remove armada_drm_debugfs_cleanup()
drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to do this explicitly. Additionally it
uses debugfs_remove_recursive() to clean up the debugfs files,
so no need for adding fake drm_info_node entries.
And finally there's no need to clean up on error,
drm_debugfs_cleanup() is called in the error path.
Joan Jani [Tue, 28 Feb 2017 18:59:52 +0000 (18:59 +0000)]
drivers:gpu: vga :vga_switcheroo.c : Fixed some coding style issues
Fixed the following style issues
drivers/gpu/vga/vga_switcheroo.c:98: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:99: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:102: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:103: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:129: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:135: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:217: WARNING: line over 80 characters
drivers/gpu/vga/vga_switcheroo.c:218: WARNING: line over 80 characters
drivers/gpu/vga/vga_switcheroo.c:308: WARNING: please, no space before tabs
drivers/gpu/vga/vga_switcheroo.c:340: WARNING: line over 80 characters
drivers/gpu/vga/vga_switcheroo.c:1087: WARNING: Block comments use * on subsequent lines
drivers/gpu/vga/vga_switcheroo.c:1087: WARNING: Block comments use a trailing */ on a separate line
Daniel Vetter [Tue, 28 Feb 2017 19:36:57 +0000 (20:36 +0100)]
MAINTAINERS: Update git entries for drivers in drm-misc
It's still just an experiment, but one lesson learned from drm-misc is
that not updating MAINTAINERS just leads to confusion. And this is
easy to revert.
Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Eric Anholt <eric@anholt.net> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Shawn Guo <shawnguo@kernel.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170228193657.3559-1-daniel.vetter@ffwll.ch
Eric Anholt [Mon, 27 Feb 2017 20:11:43 +0000 (12:11 -0800)]
drm/vc4: Extend and edit documentation for output from the RST
I had written most of my comments as if I was describing the
individual code files the way I used to for doxygen, while for RST we
want to describe things in a more chapter/section way where there's no
obvious relation to .c files.
Additionally, several of the files had stub descriptions that I've
taken this opportunity to extend.
Michael Zoran [Fri, 24 Feb 2017 01:54:31 +0000 (17:54 -0800)]
drm/vc4: Don't wait for vblank when updating the cursor
Commonly used desktop environments such as xfce4 and gnome
on debian sid can flood the graphics drivers with cursor
updates. Because the current implementation is waiting
for a vblank between cursor updates, this will cause the
display to hang for a long time since a typical refresh
rate is only 60Hz.
This is unnecessary and unexpected by user mode software,
so simply swap out the cursor frame buffer without waiting.
In the qxl atomic model, the primary doesn't stay pinned all the time,
instead it is only pinned/unpinned between prepare_fb and cleanup_fb.
So, we no longer need a final unpin of the primary framebuffer when
disabling the crtc.
Every attempt to pin/unpin objects in memory requires
qxl_bo_reserve/unreserve calls around the pinning operation to protect
the object from concurrent access, which causes that call sequence to be
reproduced every place where pinning is needed. In some cases, that
sequence was not executed correctly, resulting in potential unprotected
pinning operations.
This commit encapsulates the reservation inside a new wrapper to make
sure it is always handled properly. In cases where reservation must be
done beforehand, for some reason, one can use the unprotected version
__qxl_bo_pin/unpin.
Thierry Reding [Tue, 28 Feb 2017 14:46:43 +0000 (15:46 +0100)]
drm: Rename connector list iterator API
Currently the functions that initialize and tear down a connector
iterator use the _get() and _put() suffixes. However, these suffixes
are typically used by reference counting functions.
Make these function names a little more consistent by changing the
suffixes to _begin() and _end(), which is a fairly common pattern in
the rest of the Linux kernel.
Thierry Reding [Tue, 28 Feb 2017 14:46:42 +0000 (15:46 +0100)]
drm: Introduce drm_property_blob_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_property_blob_get() and drm_property_blob_put() to reference count
DRM blob properties.
Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.
A semantic patch is provided that can be used to convert all drivers to
the new helpers.
Thierry Reding [Tue, 28 Feb 2017 14:46:41 +0000 (15:46 +0100)]
drm: Introduce drm_gem_object_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_gem_object_get() and drm_gem_object_put(), as well as an unlocked
variant of the latter, to reference count GEM buffer objects.
Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.
The existing semantic patch for the DRM subsystem-wide conversion is
extended to account for these new helpers.
Thierry Reding [Tue, 28 Feb 2017 14:46:40 +0000 (15:46 +0100)]
drm: Introduce drm_framebuffer_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_framebuffer_get() and drm_framebuffer_put() to reference count DRM
framebuffers.
Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.
The existing semantic patch for the DRM subsystem-wide conversion is
extended to account for these new helpers.
Thierry Reding [Tue, 28 Feb 2017 14:46:39 +0000 (15:46 +0100)]
drm: Introduce drm_connector_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_connector_get() and drm_connector_put() functions to reference count
connectors.
Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.
The existing semantic patch for mode object reference count conversion
is extended for these new helpers.
Thierry Reding [Tue, 28 Feb 2017 14:46:38 +0000 (15:46 +0100)]
drm: Introduce drm_mode_object_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_mode_object_get() and drm_mode_object_put() to reference count DRM
mode objects.
Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.
A semantic patch is provided that can be used to convert all drivers to
the new helpers.
Thierry Reding [Tue, 28 Feb 2017 14:46:37 +0000 (15:46 +0100)]
drm: Rename drm_mode_object_get()
Subsequent patches will introduce reference counting APIs that are more
consistent with similar APIs throughout the Linux kernel. These APIs use
the _get() and _put() suffixes and will collide with this existing
function.
Rename the function to drm_mode_object_add() which is a slightly more
accurate description of what it does. Also the kerneldoc for this
function gives an indication that it's badly named because it doesn't
actually acquire a reference to anything.