Skip to content

Commit b2e7723

Browse files
mattropedanvet
authored andcommitted
drm/i915: Add i915.nuclear_pageflip command line param to force atomic (v4)
We don't have full atomic modeset support yet, but the "nuclear pageflip" subset of functionality (i.e., plane operations only) should be ready. Allow the user to force atomic on for debug purposes, or for fixed-purpose embedded devices that will only use atomic for plane updates. The term 'nuclear' is used here instead of 'atomic' to make it clear that this doesn't allow full atomic modeset support, just a (very useful) subset of the atomic functionality. We'll drop the kernel parameter and unconditionally enable atomic in a future patch once all of the necessary pieces are in. v2: - Use module_param_named_unsafe() (Daniel) - Simplify comment on DRIVER_ATOMIC guard (Daniel) v3: - Make the parameter "nuclear_pageflip" rather than just "nuclear" for clarity. (Ander) v4: - Make the internal variable "nuclear_pageflip" as well as the command-line option. (Ander) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent c196e1d commit b2e7723

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎drivers/gpu/drm/i915/i915_drv.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,14 @@ static int __init i915_init(void)
16431643
#endif
16441644
}
16451645

1646+
/*
1647+
* FIXME: Note that we're lying to the DRM core here so that we can get access
1648+
* to the atomic ioctl and the atomic properties. Only plane operations on
1649+
* a single CRTC will actually work.
1650+
*/
1651+
if (i915.nuclear_pageflip)
1652+
driver.driver_features |= DRIVER_ATOMIC;
1653+
16461654
return drm_pci_init(&driver, &i915_pci_driver);
16471655
}
16481656

‎drivers/gpu/drm/i915/i915_drv.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,7 @@ struct i915_params {
25272527
int use_mmio_flip;
25282528
bool mmio_debug;
25292529
bool verbose_state_checks;
2530+
bool nuclear_pageflip;
25302531
};
25312532
extern struct i915_params i915 __read_mostly;
25322533

‎drivers/gpu/drm/i915/i915_params.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct i915_params i915 __read_mostly = {
5252
.use_mmio_flip = 0,
5353
.mmio_debug = 0,
5454
.verbose_state_checks = 1,
55+
.nuclear_pageflip = 0,
5556
};
5657

5758
module_param_named(modeset, i915.modeset, int, 0400);
@@ -178,3 +179,7 @@ MODULE_PARM_DESC(mmio_debug,
178179
module_param_named(verbose_state_checks, i915.verbose_state_checks, bool, 0600);
179180
MODULE_PARM_DESC(verbose_state_checks,
180181
"Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions.");
182+
183+
module_param_named_unsafe(nuclear_pageflip, i915.nuclear_pageflip, bool, 0600);
184+
MODULE_PARM_DESC(nuclear_pageflip,
185+
"Force atomic modeset functionality; only planes work for now (default: false).");

0 commit comments

Comments
 (0)