Message ID | 20220109170920.2921-3-alyssa.rosenzweig@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/panfrost: Clean up our feature lists | expand |
On 09/01/2022 17:09, Alyssa Rosenzweig wrote: > Now that we only list features of interest to kernel space, lots of GPUs > have the same feature bits. To cut down on the repetition in the file, > merge feature lists that are identical between similar GPUs. > > Note that this leaves some unmerged identical Bifrost feature lists, as > there are more features affecting Bifrost kernel space that we do not > yet hanlde. NIT: s/hanlde/handle/ ;) Do you have any features in mind that we're missing? The list looks very similar to the kbase one. And anyway it is simple enough to split again if we need to. Thanks, Steve > > Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> > --- > drivers/gpu/drm/panfrost/panfrost_features.h | 40 ++++---------------- > 1 file changed, 7 insertions(+), 33 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_features.h b/drivers/gpu/drm/panfrost/panfrost_features.h > index f557fad5d5ff..34f2bae1ec8c 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_features.h > +++ b/drivers/gpu/drm/panfrost/panfrost_features.h > @@ -27,14 +27,9 @@ enum panfrost_hw_feature { > BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ > BIT_ULL(HW_FEATURE_V4)) > > -#define hw_features_t620 (\ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ > - BIT_ULL(HW_FEATURE_V4)) > - > -#define hw_features_t720 (\ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ > - BIT_ULL(HW_FEATURE_V4)) > +#define hw_features_t620 hw_features_t600 > > +#define hw_features_t720 hw_features_t600 > > #define hw_features_t760 (\ > BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > @@ -42,26 +37,13 @@ enum panfrost_hw_feature { > BIT_ULL(HW_FEATURE_XAFFINITY) | \ > BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) > > -// T860 > -#define hw_features_t860 (\ > - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ > - BIT_ULL(HW_FEATURE_XAFFINITY) | \ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) > +#define hw_features_t860 hw_features_t760 > > -#define hw_features_t880 hw_features_t860 > +#define hw_features_t880 hw_features_t760 > > -#define hw_features_t830 (\ > - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ > - BIT_ULL(HW_FEATURE_XAFFINITY) | \ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) > +#define hw_features_t830 hw_features_t760 > > -#define hw_features_t820 (\ > - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ > - BIT_ULL(HW_FEATURE_XAFFINITY) | \ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) > +#define hw_features_t820 hw_features_t760 > > #define hw_features_g71 (\ > BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > @@ -82,15 +64,7 @@ enum panfrost_hw_feature { > BIT_ULL(HW_FEATURE_PROTECTED_DEBUG_MODE) | \ > BIT_ULL(HW_FEATURE_COHERENCY_REG)) > > -#define hw_features_g51 (\ > - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ > - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ > - BIT_ULL(HW_FEATURE_XAFFINITY) | \ > - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ > - BIT_ULL(HW_FEATURE_FLUSH_REDUCTION) | \ > - BIT_ULL(HW_FEATURE_PROTECTED_MODE) | \ > - BIT_ULL(HW_FEATURE_PROTECTED_DEBUG_MODE) | \ > - BIT_ULL(HW_FEATURE_COHERENCY_REG)) > +#define hw_features_g51 hw_features_g72 > > #define hw_features_g52 (\ > BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ >
> > Now that we only list features of interest to kernel space, lots of GPUs > > have the same feature bits. To cut down on the repetition in the file, > > merge feature lists that are identical between similar GPUs. > > > > Note that this leaves some unmerged identical Bifrost feature lists, as > > there are more features affecting Bifrost kernel space that we do not > > yet hanlde. > > NIT: s/hanlde/handle/ ;) > > Do you have any features in mind that we're missing? The list looks very > similar to the kbase one. And anyway it is simple enough to split again > if we need to. Just IDVS group size. For some reason I thought there were more when I wrote that commit message. It's split to avoid churn in that patch. Logically, this series should contain three patches, with the IDVS group size enablement patch at the end. That was the series I wrote and committed to disk. For review I split it out, since the feature clean-up can land now, while the (RFC) IDVS group size patch needs testing/benchmarking.
On 12/01/2022 19:20, Alyssa Rosenzweig wrote: >>> Now that we only list features of interest to kernel space, lots of GPUs >>> have the same feature bits. To cut down on the repetition in the file, >>> merge feature lists that are identical between similar GPUs. >>> >>> Note that this leaves some unmerged identical Bifrost feature lists, as >>> there are more features affecting Bifrost kernel space that we do not >>> yet hanlde. >> >> NIT: s/hanlde/handle/ ;) >> >> Do you have any features in mind that we're missing? The list looks very >> similar to the kbase one. And anyway it is simple enough to split again >> if we need to. > > Just IDVS group size. For some reason I thought there were more when I > wrote that commit message. It's split to avoid churn in that patch. > > Logically, this series should contain three patches, with the IDVS group > size enablement patch at the end. That was the series I wrote and > committed to disk. For review I split it out, since the feature clean-up > can land now, while the (RFC) IDVS group size patch needs > testing/benchmarking. > Ah, of course! That makes perfect sense, but somehow I hadn't managed to connect the two. I've fixed the typo and pushed to drm-misc-next. And I'll wait for your benchmarking on IDVS. Do I get a few minutes break before the Valhall patches need reviewing? ;) Thanks, Steve
> >>> Note that this leaves some unmerged identical Bifrost feature lists, as > >>> there are more features affecting Bifrost kernel space that we do not > >>> yet hanlde. > >> > >> NIT: s/hanlde/handle/ ;) > >> > >> Do you have any features in mind that we're missing? The list looks very > >> similar to the kbase one. And anyway it is simple enough to split again > >> if we need to. > > > > Just IDVS group size. For some reason I thought there were more when I > > wrote that commit message. It's split to avoid churn in that patch. > > > > Logically, this series should contain three patches, with the IDVS group > > size enablement patch at the end. That was the series I wrote and > > committed to disk. For review I split it out, since the feature clean-up > > can land now, while the (RFC) IDVS group size patch needs > > testing/benchmarking. > > > > Ah, of course! That makes perfect sense, but somehow I hadn't managed to > connect the two. > > I've fixed the typo and pushed to drm-misc-next. And I'll wait for your > benchmarking on IDVS. Do I get a few minutes break before the Valhall > patches need reviewing? ;) Thanks for the push :-) And yes, I'd like to get Valhall userspace up to shape before trying to shovel code into the kernel ^^ There are some errata that kbase works around that I haven't implemented workarounds for yet, and I'd like to figure out how to hit those so I can test that the workarounds are correct. (Particularly thinking of the dummy job workaround / GPU hang issue)
diff --git a/drivers/gpu/drm/panfrost/panfrost_features.h b/drivers/gpu/drm/panfrost/panfrost_features.h index f557fad5d5ff..34f2bae1ec8c 100644 --- a/drivers/gpu/drm/panfrost/panfrost_features.h +++ b/drivers/gpu/drm/panfrost/panfrost_features.h @@ -27,14 +27,9 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ BIT_ULL(HW_FEATURE_V4)) -#define hw_features_t620 (\ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ - BIT_ULL(HW_FEATURE_V4)) - -#define hw_features_t720 (\ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ - BIT_ULL(HW_FEATURE_V4)) +#define hw_features_t620 hw_features_t600 +#define hw_features_t720 hw_features_t600 #define hw_features_t760 (\ BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ @@ -42,26 +37,13 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_XAFFINITY) | \ BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) -// T860 -#define hw_features_t860 (\ - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ - BIT_ULL(HW_FEATURE_XAFFINITY) | \ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) +#define hw_features_t860 hw_features_t760 -#define hw_features_t880 hw_features_t860 +#define hw_features_t880 hw_features_t760 -#define hw_features_t830 (\ - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ - BIT_ULL(HW_FEATURE_XAFFINITY) | \ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) +#define hw_features_t830 hw_features_t760 -#define hw_features_t820 (\ - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ - BIT_ULL(HW_FEATURE_XAFFINITY) | \ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT)) +#define hw_features_t820 hw_features_t760 #define hw_features_g71 (\ BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ @@ -82,15 +64,7 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_PROTECTED_DEBUG_MODE) | \ BIT_ULL(HW_FEATURE_COHERENCY_REG)) -#define hw_features_g51 (\ - BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ - BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ - BIT_ULL(HW_FEATURE_XAFFINITY) | \ - BIT_ULL(HW_FEATURE_THREAD_GROUP_SPLIT) | \ - BIT_ULL(HW_FEATURE_FLUSH_REDUCTION) | \ - BIT_ULL(HW_FEATURE_PROTECTED_MODE) | \ - BIT_ULL(HW_FEATURE_PROTECTED_DEBUG_MODE) | \ - BIT_ULL(HW_FEATURE_COHERENCY_REG)) +#define hw_features_g51 hw_features_g72 #define hw_features_g52 (\ BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \
Now that we only list features of interest to kernel space, lots of GPUs have the same feature bits. To cut down on the repetition in the file, merge feature lists that are identical between similar GPUs. Note that this leaves some unmerged identical Bifrost feature lists, as there are more features affecting Bifrost kernel space that we do not yet hanlde. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> --- drivers/gpu/drm/panfrost/panfrost_features.h | 40 ++++---------------- 1 file changed, 7 insertions(+), 33 deletions(-)