[Intel-gfx] [PATCH 13/13] drm/i915: Add i915.nuclear kernel command line param to force atomic

Ander Conselvan de Oliveira conselvan2 at gmail.com
Wed Jan 21 10:44:50 PST 2015


On 01/20/2015 05:57 AM, Matt Roper wrote:
> 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.

Can we make that i915.nuclear_pageflip instead? I think it should make 
it more clear.

Cheers,
Ander

> We'll drop the kernel parameter and unconditionally enable atomic in a
> future patch once all of the necessary pieces are in.
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.c    | 12 ++++++++++++
>   drivers/gpu/drm/i915/i915_drv.h    |  1 +
>   drivers/gpu/drm/i915/i915_params.c |  5 +++++
>   3 files changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 308774f..173747a 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1642,6 +1642,18 @@ static int __init i915_init(void)
>   #endif
>   	}
>
> +	/*
> +	 * FIXME: We don't yet support full atomic modeset, just the plane
> +	 * operations subset (i.e., the "nuclear pageflip" functionality).
> +	 * Allow us to advertise atomic functionality when specifically
> +	 * requested on the kernel command line.
> +	 *
> +	 * We'll remove this module parameter and just advertise DRIVER_ATOMIC
> +	 * unconditionally once the rest of the atomic infrastructure is ready.
> +	 */
> +	if (i915.nuclear)
> +		driver.driver_features |= DRIVER_ATOMIC;
> +
>   	return drm_pci_init(&driver, &i915_pci_driver);
>   }
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 1d55c94..b53564b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2445,6 +2445,7 @@ struct i915_params {
>   	int use_mmio_flip;
>   	bool mmio_debug;
>   	bool verbose_state_checks;
> +	bool nuclear;
>   };
>   extern struct i915_params i915 __read_mostly;
>
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 07252d8..54ea182 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -52,6 +52,7 @@ struct i915_params i915 __read_mostly = {
>   	.use_mmio_flip = 0,
>   	.mmio_debug = 0,
>   	.verbose_state_checks = 1,
> +	.nuclear = 0,
>   };
>
>   module_param_named(modeset, i915.modeset, int, 0400);
> @@ -178,3 +179,7 @@ MODULE_PARM_DESC(mmio_debug,
>   module_param_named(verbose_state_checks, i915.verbose_state_checks, bool, 0600);
>   MODULE_PARM_DESC(verbose_state_checks,
>   	"Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions.");
> +
> +module_param_named(nuclear, i915.nuclear, bool, 0600);
> +MODULE_PARM_DESC(nuclear,
> +		 "Force atomic modeset functionality; only planes work for now (default: false).");
>



More information about the Intel-gfx mailing list