In cases where implicit sync is used, it is still useful (for things like sub-allocation, etc) to allow userspace to opt-out of implicit sync on per-BO basis.
Unified · Split
| @@ -45,9 +45,10 @@ · 44 unmodified lines | ||
| 45 | 45 | * - 1.7.0 - Add MSM_PARAM_SUSPENDS to access suspend count |
| 46 | 46 | * - 1.8.0 - Add MSM_BO_CACHED_COHERENT for supported GPUs (a6xx) |
| 47 | 47 | * - 1.9.0 - Add MSM_SUBMIT_FENCE_SN_IN |
| 48 | + * - 1.10.0 - Add MSM_SUBMIT_BO_NO_IMPLICIT | |
| 48 | 49 | */ |
| 49 | 50 | #define MSM_VERSION_MAJOR 1 |
| 50 | −#define MSM_VERSION_MINOR 9 | |
| 51 | +#define MSM_VERSION_MINOR 10 | |
| 51 | 52 | #define MSM_VERSION_PATCHLEVEL 0 |
| 52 | 53 | |
| 53 | 54 | static const struct drm_mode_config_funcs mode_config_funcs = { |
| @@ -334,9 +334,20 @@ static int submit_fence_sync(struct msm_gem_submit *submit, bool no_implicit) · 333 unmodified lines | ||
| 334 | 334 | if (ret) |
| 335 | 335 | return ret; |
| 336 | 336 | |
| 337 | + /* If userspace has determined that explicit fencing is | |
| 338 | + * used, it can disable implicit sync on the entire | |
| 339 | + * submit: | |
| 340 | + */ | |
| 337 | 341 | if (no_implicit) |
| 338 | 342 | continue; |
| 339 | 343 | |
| 344 | + /* Otherwise userspace can ask for implicit sync to be | |
| 345 | + * disabled on specific buffers. This is useful for internal | |
| 346 | + * usermode driver managed buffers, suballocation, etc. | |
| 347 | + */ | |
| 348 | + if (submit->bos[i].flags & MSM_SUBMIT_BO_NO_IMPLICIT) | |
| 349 | + continue; | |
| 350 | + | |
| 340 | 351 | ret = drm_sched_job_add_implicit_dependencies(&submit->base, |
| 341 | 352 | obj, |
| 342 | 353 | write); |
| @@ -222,10 +222,12 @@ struct drm_msm_gem_submit_cmd { · 221 unmodified lines | ||
| 222 | 222 | #define MSM_SUBMIT_BO_READ 0x0001 |
| 223 | 223 | #define MSM_SUBMIT_BO_WRITE 0x0002 |
| 224 | 224 | #define MSM_SUBMIT_BO_DUMP 0x0004 |
| 225 | +#define MSM_SUBMIT_BO_NO_IMPLICIT 0x0008 | |
| 225 | 226 | |
| 226 | 227 | #define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | \ |
| 227 | 228 | MSM_SUBMIT_BO_WRITE | \ |
| 228 | − MSM_SUBMIT_BO_DUMP) | |
| 229 | + MSM_SUBMIT_BO_DUMP | \ | |
| 230 | + MSM_SUBMIT_BO_NO_IMPLICIT) | |
| 229 | 231 | |
| 230 | 232 | struct drm_msm_gem_submit_bo { |
| 231 | 233 | __u32 flags; /* in, mask of MSM_SUBMIT_BO_x */ |