gallium (iris) depends on os_same_file_description() to disambiguate
screens and so avoid importing the same screen fd twice as two distinct
entities (that share all the kernel resources, so actions on screen
affect the other and would cause random faiure). As they depend on it,
so must we. os_same_file_description() uses SYS_kcmp to check the file
tables for the equivalent struct file, but SYS_kcmp is hidden behind
CONFIG_CHECKPOINT_RESTORE. As this is not default, we must select it for
…
[View More]ourselves to ensure that our userspace is fully supported.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3046
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula(a)intel.com>
Cc: Daniel Vetter <daniel.vetter(a)ffwll.ch>
---
drivers/gpu/drm/i915/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 1e1cb245fca7..470a5214bd33 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -21,6 +21,7 @@ config DRM_I915
select ACPI_VIDEO if ACPI
select ACPI_BUTTON if ACPI
select SYNC_FILE
+ select CHECKPOINT_RESTORE # gallium depends on SYS_kcmp
select IOSF_MBI
select CRC32
select SND_HDA_I915 if SND_HDA_CORE
--
2.20.1
[View Less]
Several SHMEM-based drivers use the BO as shadow buffer for the real
framebuffer memory. Damage handling requires a vmap of the BO memory.
But vmap/vunmap can acquire the dma-buf reservation lock, which is not
allowed in commit tails.
This patchset introduces a set of helpers that implement vmap/vunmap
in the plane's prepare_fb and cleanup_fb; and provide the mapping's
address to commit-tail functions. Wrappers for simple KMS are provides,
as all of the involved drivers are built upon simple-…
[View More]KMS helpers.
Patch 1 adds the support for private plane state to the simple-KMS
helper library.
Patches 2 and 3 provide plane state for shadow-buffered planes. It's a
DRM plane with BO mappings into kernel address space. The involved
helpers take care of the details. The code is independent from GEM
SHMEM and can be used with other shadow-buffered planes. I put all
this in a new file. In a later patch, drm_gem_fb_prepare_fb() et al
could be moved there as well.
Patches 4 to 7 convert each involved driver to the new helpers. The
vmap operations are being removed from commit-tail functions. An
additional benefit is that vmap errors are now detected before the
commit starts. The original commit-tail functions could not
handle failed vmap operations.
I smoke-tested the code by running fbdev, Xorg and weston with the
converted mgag200 driver.
v2:
* export drm_gem_vmap()/_vunmap() (kernel test robot)
* make duplicate_state interface compatible with
struct drm_plane_funcs
Thomas Zimmermann (7):
drm/simple-kms: Add plane-state helpers
drm/gem: Export drm_gem_vmap() and drm_gem_vunmap()
drm: Add additional atomic helpers for shadow-buffered planes
drm/mgag200: Move vmap out of commit tail
drm/cirrus: Move vmap out of commit tail
drm/gm12u320: Move vmap out of commit tail
drm/udl: Move vmap out of commit tail
Documentation/gpu/drm-kms-helpers.rst | 12 ++
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/drm_gem.c | 2 +
drivers/gpu/drm/drm_gem_atomic_helper.c | 208 ++++++++++++++++++++++++
drivers/gpu/drm/drm_simple_kms_helper.c | 40 ++++-
drivers/gpu/drm/mgag200/mgag200_mode.c | 23 +--
drivers/gpu/drm/tiny/cirrus.c | 43 ++---
drivers/gpu/drm/tiny/gm12u320.c | 28 ++--
drivers/gpu/drm/udl/udl_modeset.c | 34 ++--
include/drm/drm_gem_atomic_helper.h | 73 +++++++++
include/drm/drm_simple_kms_helper.h | 27 +++
11 files changed, 412 insertions(+), 81 deletions(-)
create mode 100644 drivers/gpu/drm/drm_gem_atomic_helper.c
create mode 100644 include/drm/drm_gem_atomic_helper.h
base-commit: f9173d6435c6a9bb0b0076ebf9122d876da208ae
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: f8140f08b77c49beb6243d9a2a88ebcc7097e391
prerequisite-patch-id: 6bffaf03d01daeb29a0b0ffbc78b415e72907a17
prerequisite-patch-id: 6386ca949b8b677a7eada2672990dab2f84f734f
prerequisite-patch-id: 706e35d0b2185d2332f725e1c22d8ffed910ea7b
prerequisite-patch-id: e30631cc73b905efa477be3f56daf1ff5112fe03
--
2.30.0
[View Less]
From: Colin Ian King <colin.king(a)canonical.com>
Don't populate the const array m_div_val on the stack but instead make
it static. Makes the object code smaller by 29 bytes:
Before:
text data bss dec hex filename
34736 4552 0 39288 9978 drivers/gpu/drm/mgag200/mgag200_mode.o
After:
text data bss dec hex filename
34625 4616 0 39241 9949 drivers/gpu/drm/mgag200/mgag200_mode.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.…
[View More]king(a)canonical.com>
Reviewed-by: Thomas Zimmermann <tzimmermann(a)suse.de>
---
V2: move static declaration to the top of the declarations
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 1dfc42170059..c3dfde8cad25 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -706,13 +706,13 @@ static int mga_g200eh_set_plls(struct mga_device *mdev, long clock)
static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
{
+ static const unsigned int m_div_val[] = { 1, 2, 4, 8 };
unsigned int vcomax, vcomin, pllreffreq;
unsigned int delta, tmpdelta;
int testr, testn, testm, testo;
unsigned int p, m, n;
unsigned int computed, vco;
int tmp;
- const unsigned int m_div_val[] = { 1, 2, 4, 8 };
m = n = p = 0;
vcomax = 1488000;
--
2.29.2
[View Less]
Am 05.02.21 um 14:22 schrieb Thomas Zimmermann:
>> All errors (new ones prefixed by >>, old ones prefixed by <<):
>>
>>>> ERROR: modpost: "drm_gem_vunmap" [drivers/gpu/drm/drm_kms_helper.ko]
>>>> undefined!
>>>> ERROR: modpost: "drm_gem_vmap" [drivers/gpu/drm/drm_kms_helper.ko]
>>>> undefined!
>
> These are in drm_gem.c and build unconditionally. It's not clear to me
> how this can fail. Ideas, anyone?
Oh, …
[View More]they are not exported. Can we export them?
>
> Best regards
> Thomas
>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[View Less]
This was non-trivial to get right because commits
c23bc382ef0e ("coresight: etm4x: Refactor probing routine") and
5214b563588e ("coresight: etm4x: Add support for sysreg only devices")
changed the code flow considerably. With this change the driver can be
built again.
Fixes: 0573d3fa4864 ("Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next")
Signed-off-by: Uwe Kleine-König <uwe(a)kleine-koenig.org>
---
On Fri, Feb 05, 2021 at 12:07:09PM +0100, …
[View More]Greg Kroah-Hartman wrote:
> On Fri, Feb 05, 2021 at 11:56:15AM +0100, Uwe Kleine-König wrote:
> > I didn't compile test, but I'm willing to bet your resolution is wrong.
> > You have no return statement in etm4_remove_dev() but its return type is
> > int and etm4_remove_amba() still returns int but should return void.
>
> Can you send a patch to fix this up?
Sure, here it comes. As I'm unsure if you want to squash it into the
merge or want to keep it separate I crafted a commit message. If you
prefer squashing feel free to do so.
This change corresponds to the merge resolution I suggested before.
Best regards
Uwe
drivers/hwtracing/coresight/coresight-etm4x-core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index bc55b261af23..c8ecd91e289e 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -1906,15 +1906,16 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
cpus_read_unlock();
coresight_unregister(drvdata->csdev);
+
+ return 0;
}
-static int __exit etm4_remove_amba(struct amba_device *adev)
+static void __exit etm4_remove_amba(struct amba_device *adev)
{
struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
if (drvdata)
- return etm4_remove_dev(drvdata);
- return 0;
+ etm4_remove_dev(drvdata);
}
static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
--
2.29.2
[View Less]
This series attempts to enable V3D on BCM2711, the SoC available on the
Raspberry Pi 4 family of boards.
Due to the lack of documentation some things are taken as it from
testing/downstream implementation[1], which I'm hilighting here:
- It's not clear that the following is 100% true, maybe someone can confirm:
"In BCM2711 the new ARGON ASB took over V3D. The old ASB is still
present with the ISP and H264 bits, and V3D is in the same place in the
new ASB as the old one."
- Patch #6 I …
[View More]took as is from the downstream implementation, I can't really
provide an exact explanation on what changed HW wise.
Ultimately, I need confirmation from the Broadcom folks that they are alright
with patch #7.
With all this, I get a more or less stable experience using mesa 20.3.4 and
X11/Gnome.
Regards,
Nicolas
---
Nicolas Saenz Julienne (11):
dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema
dt-bindings: soc: bcm: brcm,bcm2835-pm: Add support for bcm2711
ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node
mfd: bcm2835-pm: Add support for BCM2711
soc: bcm: bcm2835-power: Add support for BCM2711's ARSAN ASB
soc: bcm: bcm2835-power: Bypass power_on/off() calls
drm/v3d: Get rid of pm code
drm/v3d: Add support for bcm2711
ARM: dts: bcm2711: Enable V3D
ARM: configs: Enable DRM_V3D
arm64: config: Enable DRM_V3D
.../bindings/soc/bcm/brcm,bcm2835-pm.txt | 46 -----------
.../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 80 +++++++++++++++++++
arch/arm/boot/dts/bcm2711.dtsi | 14 +++-
arch/arm/configs/multi_v7_defconfig | 1 +
arch/arm64/configs/defconfig | 1 +
drivers/gpu/drm/v3d/Kconfig | 2 +-
drivers/gpu/drm/v3d/v3d_debugfs.c | 18 +----
drivers/gpu/drm/v3d/v3d_drv.c | 12 +--
drivers/gpu/drm/v3d/v3d_gem.c | 9 ---
drivers/mfd/bcm2835-pm.c | 55 ++++++++++---
drivers/soc/bcm/bcm2835-power.c | 74 +++++++++++------
include/linux/mfd/bcm2835-pm.h | 1 +
12 files changed, 190 insertions(+), 123 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt
create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml
--
2.30.0
[View Less]