On Sat, May 13, 2017 at 11:59 AM, Francisco Jerez <curroje...@riseup.net> wrote:
> Anuj Phogat <anuj.pho...@gmail.com> writes: > > > Cherryview and Broxton are always gt1. So, remove the redundant checks. > > > > Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> > > --- > > src/intel/common/gen_l3_config.c | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_ > config.c > > index 4fe3503..0720079 100644 > > --- a/src/intel/common/gen_l3_config.c > > +++ b/src/intel/common/gen_l3_config.c > > @@ -258,13 +258,11 @@ get_l3_way_size(const struct gen_device_info > *devinfo) > > if (devinfo->is_baytrail) > > return 2; > > > > - else if (devinfo->gt == 1 || > > - devinfo->is_cherryview || > > - devinfo->is_broxton) > > - return 4; > > + /* Cherryview and Broxton are always gt1 */ > > + if (devinfo->gt == 1) > > + return 4; > > > > I don't feel that replacing self-documenting code with equivalent > non-self-documenting code plus a comment containing the same information > as the code you removed actually simplifies anything. That said, this > function *could* be simplified appreciably by using the l3_banks field > you added to gen_device_info to calculate the way size consistently > across all gens up to Gen10. Care to do that instead? > I remember you made this suggestion about l3_banks field in an earlier comment. I've it in my task queue. > > > - else > > - return 8 * devinfo->num_slices; > > + return 8 * devinfo->num_slices; > > } > > > > /** > > -- > > 2.9.3 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev