Commit 31e59f3
Jocelyn Falempe
drm/i915/huc: better define HuC status getparam possible return values.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2041690
Upstream Status: git://anongit.freedesktop.org/drm/drm
commit b76c14c
Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
AuthorDate: Tue Sep 27 17:41:43 2022 -0700
Commit: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
CommitDate: Mon Oct 3 11:29:20 2022 -0700
The current HuC status getparam return values are a bit confusing in
regards to what happens in some scenarios. In particular, most of the
error cases cause the ioctl to return an error, but a couple of them,
INIT_FAIL and LOAD_FAIL, are not explicitly handled and neither is
their expected return value documented; these 2 error cases therefore
end up into the catch-all umbrella of the "HuC not loaded" case, with
this case therefore including both some error scenarios and the load
in progress one.
The updates included in this patch change the handling so that all
error cases behave the same way, i.e. return an errno code, and so
that the HuC load in progress case is unambiguous.
The patch also includes a small change to the FW init path to make sure
we always transition to an error state if something goes wrong.
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Tony Ye <tony.ye@intel.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Tony Ye <tony.ye@intel.com>
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220928004145.745803-14-daniele.ceraolospurio@intel.com
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>1 parent a095846 commit 31e59f3
File tree
4 files changed
+24
-8
lines changed- drivers/gpu/drm/i915/gt/uc
- include/uapi/drm
4 files changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
477 | 478 | | |
478 | 479 | | |
479 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| |||
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 408 | + | |
| 409 | + | |
414 | 410 | | |
415 | 411 | | |
416 | 412 | | |
| |||
423 | 419 | | |
424 | 420 | | |
425 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
898 | 897 | | |
899 | 898 | | |
900 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
648 | 664 | | |
649 | 665 | | |
650 | 666 | | |
| |||
0 commit comments