[Intel-gfx] [PATCH] drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Chris Wilson
We have to cleanup after i915_perf_init(), even on the error path, as it passes a pointer into the module to the sysfs core. If we fail to unregister the sysctl table, we leave a dangling pointer which then may explode anytime later the sysctl table, we leave a dangling pointer which then may explo

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Call i915_perf_fini() on init_hw error unwind URL : https://patchwork.freedesktop.org/series/41711/ State : failure == Summary == CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease

Re: [Intel-gfx] [PATCH 0/9] GPU-bound energy efficiency improvements for the intel_pstate driver.

2018-04-14 Thread Peter Zijlstra
On Fri, Apr 13, 2018 at 06:57:39PM -0700, Francisco Jerez wrote: > Peter Zijlstra writes: > > > On Thu, Apr 12, 2018 at 12:55:39PM -0700, Francisco Jerez wrote: > >> Actually assuming that a single geometric feature of the power curve is > >> known -- it being convex in the frequency range allowe

Re: [Intel-gfx] [PATCH i-g-t v4] tests/perf_pmu: Avoid RT thread for accuracy test

2018-04-14 Thread Chris Wilson
Quoting Tvrtko Ursulin (2018-04-11 14:52:36) > > On 11/04/2018 14:23, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2018-04-04 10:51:52) > >> From: Tvrtko Ursulin > >> > >> Realtime scheduling interferes with execlists submission (tasklet) so try > >> to simplify the PWM loop in a few ways: > >

[Intel-gfx] [RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-14 Thread Noralf Trønnes
This patchset explores the possibility of having generic fbdev emulation in DRM for drivers that supports dumb buffers which they can export. An API is added to support in-kernel clients in general. In this version I was able to reuse the modesetting code from drm_fb_helper in the client API. This

[Intel-gfx] [RFC v4 02/25] drm/file: Don't set master on in-kernel clients

2018-04-14 Thread Noralf Trønnes
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index d4588d33f91c..5

[Intel-gfx] [RFC v4 01/25] drm: provide management functions for drm_file

2018-04-14 Thread Noralf Trønnes
From: David Herrmann Rather than doing drm_file allocation/destruction right in the fops, lets provide separate helpers. This decouples drm_file management from the still-mandatory drm-fops. It prepares for use of drm_file without the fops, both by possible separate fops implementations and APIs

[Intel-gfx] [RFC v4 04/25] drm/fb-helper: Remove drm_fb_helper_debug_enter/leave()

2018-04-14 Thread Noralf Trønnes
Atomic drivers can't use them so finish what was started in commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for atomic drivers"). This prepares the ground for creating modesets on demand. TODO: - Actually remove the functions, not just the contents. - Nuke drm_crtc_helper_funcs->mode_set_bas

[Intel-gfx] [RFC v4 07/25] drm: Begin an API for in-kernel clients

2018-04-14 Thread Noralf Trønnes
This the beginning of an API for in-kernel clients. First out is a display representation that will be used by drm_fb_helper in order to move out its mode setting code. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_client.c | 119 +++

[Intel-gfx] [RFC v4 05/25] drm/fb-helper: dpms_legacy(): Only set on connectors in use

2018-04-14 Thread Noralf Trønnes
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dr

[Intel-gfx] [RFC v4 03/25] drm/fb-helper: No need to cache rotation and sw_rotations

2018-04-14 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 131 include/drm/drm_fb_helper.h

[Intel-gfx] [RFC v4 19/25] drm/client: Finish the in-kernel client API

2018-04-14 Thread Noralf Trønnes
The modesetting code is already present, this adds the rest of the API. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c | 573 + drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm_drv.c | 11 + drivers/gpu/drm/drm_fi

[Intel-gfx] [RFC v4 17/25] drm/client: Bail out if there's a DRM master

2018-04-14 Thread Noralf Trønnes
If there's a DRM master, return -EBUSY. Block userspace from becoming master by taking the master lock while the client is setting the mode. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_auth.c | 33 + drivers/gpu/drm/drm_

[Intel-gfx] [RFC v4 06/25] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2018-04-14 Thread Noralf Trønnes
Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_atomic.c| 168 +++

[Intel-gfx] [RFC v4 09/25] drm/fb-helper: Move modeset commit code to drm_client

2018-04-14 Thread Noralf Trønnes
This moves the committing part of the modesetting code to drm_client. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 242 drivers/gpu/drm/drm_fb_helper.c | 216 +-- include/drm/drm_client.h| 8

[Intel-gfx] [RFC v4 18/25] drm/client: Make the display modes available to clients

2018-04-14 Thread Noralf Trønnes
Give clients easy access to the display modes. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c | 159 +-- include/drm/drm_client.h | 25 +++ 2 files changed, 148 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/drm_clien

[Intel-gfx] [RFC v4 15/25] drm/fb-helper: Move modeset config code to drm_client

2018-04-14 Thread Noralf Trønnes
Call the function drm_client_find_display(). No functional change apart from making width/height arguments optional. Some function name/signature changes and whitespace adjustments. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 399

[Intel-gfx] [RFC v4 16/25] drm: Make ioctls available for in-kernel clients

2018-04-14 Thread Noralf Trønnes
Make ioctl wrappers for functions that will be used by the in-kernel API. The following functions are touched: - drm_mode_create_dumb_ioctl() - drm_mode_destroy_dumb_ioctl() - drm_mode_addfb2() - drm_mode_rmfb() - drm_prime_handle_to_fd_ioctl() drm_mode_addfb2() also gets the ability to override t

[Intel-gfx] [RFC v4 08/25] drm/fb-helper: Use struct drm_client_display

2018-04-14 Thread Noralf Trønnes
Prepare to move the modeset committing code to drm_client. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 161 include/drm/drm_fb_helper.h | 8 ++ 2 files changed, 89 insertions(+), 80 deletions(-) diff --git a/drivers/gpu/drm/

[Intel-gfx] [RFC v4 11/25] drm/connector: Add connector array functions

2018-04-14 Thread Noralf Trønnes
Add functions to deal with the registred connectors as an array: - drm_connector_get_all() - drm_connector_put_all() And to get the enabled status of those connectors: drm_connector_get_enabled_status() This is prep work to remove struct drm_fb_helper_connector. Signed-off-by: Noralf Trønnes --

[Intel-gfx] [RFC v4 14/25] drm/fb-helper: Remove struct drm_fb_helper_connector

2018-04-14 Thread Noralf Trønnes
No need to maintain a list of registered connectors. Just use the connector iterator. TODO: Remove: - drm_fb_helper_add_one_connector() - drm_fb_helper_single_add_all_connectors() - drm_fb_helper_remove_one_connector() Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 359

[Intel-gfx] [RFC v4 13/25] drm/fb-helper: Remove struct drm_fb_helper_crtc

2018-04-14 Thread Noralf Trønnes
The stage is now set for a clean removal of drm_fb_helper_crtc. struct drm_client_display is doing its job now. Also remove the drm_fb_helper_funcs->initial_config which has been superseded by drm_driver->initial_client_display. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c

[Intel-gfx] [RFC v4 10/25] drm/connector: Add drm_connector_has_preferred_mode/pick_cmdline_mode()

2018-04-14 Thread Noralf Trønnes
Move them over from drm_fb_helper since they are connector functions. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_connector.c| 94 ++ drivers/gpu/drm/drm_fb_helper.c| 75 ++ drivers/gpu/drm/i915/intel_fbdev.c | 7

[Intel-gfx] [RFC v4 20/25] drm/prime: Don't pin module on export for in-kernel clients

2018-04-14 Thread Noralf Trønnes
Avoid pinning the module when exporting a GEM object as a dmabuf. This makes it possible to unload drivers that has in-kernel clients using it. The client is removed on drm_dev_unregister() so no need to pin the driver. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_prime.c | 24 +

[Intel-gfx] [RFC v4 23/25] drm: Add DRM device registered notifier

2018-04-14 Thread Noralf Trønnes
Add a notifier that fires when a new DRM device is registered. This can be used by the bootsplash client to connect to all devices. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_drv.c | 32 include/drm/drm_drv.h | 4 2 files changed, 36 insertio

[Intel-gfx] [RFC v4 12/25] drm/i915: Add drm_driver->initial_client_display callback

2018-04-14 Thread Noralf Trønnes
As part of moving the modesetting code out of drm_fb_helper and into drm_client, the drm_fb_helper_funcs->initial_config callback needs to go. Replace it with a drm_driver->initial_client_display callback that can work for all in-kernel clients. TODO: - Add a patch that moves the function out of i

[Intel-gfx] [RFC v4 21/25] drm/fb-helper: Add drm_fb_helper_fb_open/release()

2018-04-14 Thread Noralf Trønnes
These helpers keep track of fbdev users and drm_driver.last_close will only restore fbdev when actually in use. Additionally the display is turned off when the last user is closing. fbcon is a user in this context. If struct fb_ops is defined in a library, fb_open() takes a ref on the library (fb_

[Intel-gfx] [RFC v4 25/25] drm/client: Hack: Add DRM VT console client

2018-04-14 Thread Noralf Trønnes
A hack to test the client API. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/client/Kconfig | 5 + drivers/gpu/drm/client/Makefile| 3 + drivers/gpu/drm/client/drm_vtcon.c | 785 + 4 files changed, 79

[Intel-gfx] [RFC v4 24/25] drm/client: Hack: Add bootsplash

2018-04-14 Thread Noralf Trønnes
A hack to test the client API. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/client/Kconfig | 9 ++ drivers/gpu/drm/client/drm_bootsplash.c | 248 dri

[Intel-gfx] [RFC v4 22/25] drm/fb-helper: Add generic fbdev emulation

2018-04-14 Thread Noralf Trønnes
This adds generic fbdev emulation for drivers that supports dumb buffers which they can export. All the driver has to do is call drm_fbdev_generic_setup(). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 255 include/drm/drm_fb_helper

[Intel-gfx] [CI] drm/i915: Check whitelist registers across resets

2018-04-14 Thread Chris Wilson
Add a selftest to ensure that we restore the whitelisted registers after rewrite the registers everytime they might be scrubbed, e.g. module load, reset and resume. For the other volatile workaround registers, we export their presence via debugfs and check in igt/gem_workarounds. However, we don't

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Arkadiusz Hiler
On Sat, Apr 14, 2018 at 09:18:52AM +, Patchwork wrote: > == Series Details == > > Series: drm/i915: Call i915_perf_fini() on init_hw error unwind > URL : https://patchwork.freedesktop.org/series/41711/ > State : failure > > == Summary == > > CHK include/config/kernel.release > CHK

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Add generic fbdev emulation

2018-04-14 Thread Patchwork
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/41713/ State : warning == Summary == $ dim checkpatch origin/drm-tip 81446b0d0a5c drm: provide management functions for drm_file 60830bd79f28 drm/file: Don't set master on in-kernel cli

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm: Add generic fbdev emulation

2018-04-14 Thread Patchwork
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/41713/ State : warning == Summary == $ dim sparse origin/drm-tip Commit: drm: provide management functions for drm_file Okay! Commit: drm/file: Don't set master on in-kernel clients Ok

Re: [Intel-gfx] [PATCH] drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Lionel Landwerlin
On 14/04/18 02:12, Chris Wilson wrote: We have to cleanup after i915_perf_init(), even on the error path, as it passes a pointer into the module to the sysfs core. If we fail to unregister the sysctl table, we leave a dangling pointer which then may explode anytime later the sysctl table, we leav

[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Add generic fbdev emulation

2018-04-14 Thread Patchwork
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/41713/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053 -> Patchwork_8690 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.fr

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Check whitelist registers across resets (rev3)

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Check whitelist registers across resets (rev3) URL : https://patchwork.freedesktop.org/series/41631/ State : warning == Summary == $ dim checkpatch origin/drm-tip e8b78ed9f2c3 drm/i915: Check whitelist registers across resets -:410: WARNING:FILE_PATH_CHAN

Re: [Intel-gfx] [PATCH] drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Michal Wajdeczko
On Sat, 14 Apr 2018 11:12:33 +0200, Chris Wilson wrote: We have to cleanup after i915_perf_init(), even on the error path, as it passes a pointer into the module to the sysfs core. If we fail to unregister the sysctl table, we leave a dangling pointer which then may explode anytime later the

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Check whitelist registers across resets (rev3)

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Check whitelist registers across resets (rev3) URL : https://patchwork.freedesktop.org/series/41631/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053 -> Patchwork_8691 = == Summary - SUCCESS == No regressions found. External UR

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Call i915_perf_fini() on init_hw error unwind URL : https://patchwork.freedesktop.org/series/41711/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053 -> Patchwork_8692 = == Summary - WARNING == Minor unknown changes coming with Pat

[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Add generic fbdev emulation

2018-04-14 Thread Patchwork
== Series Details == Series: drm: Add generic fbdev emulation URL : https://patchwork.freedesktop.org/series/41713/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053_full -> Patchwork_8690_full = == Summary - SUCCESS == No regressions found. External URL: https://pa

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Check whitelist registers across resets (rev3)

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Check whitelist registers across resets (rev3) URL : https://patchwork.freedesktop.org/series/41631/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053_full -> Patchwork_8691_full = == Summary - SUCCESS == No regressions found. E

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Call i915_perf_fini() on init_hw error unwind

2018-04-14 Thread Patchwork
== Series Details == Series: drm/i915: Call i915_perf_fini() on init_hw error unwind URL : https://patchwork.freedesktop.org/series/41711/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4053_full -> Patchwork_8692_full = == Summary - SUCCESS == No regressions found. Ex

Re: [Intel-gfx] [PATCH] drm/i915/edp: Only use alternate fixed mode when requested

2018-04-14 Thread Vivi, Rodrigo
> On Apr 12, 2018, at 2:21 PM, Taylor, Clinton A > wrote: > > > >> On 04/11/2018 04:11 PM, Chris Wilson wrote: >> Quoting clinton.a.tay...@intel.com (2018-04-12 00:13:26) >>> From: Clint Taylor >>> >>> In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP >>> if availab