kms_frontbuffer_tracking: rename enum fbs

I tried explaining these to people twice and realized how bad the
current naming was. Let's hope the new one is better.

The downside is that the tests were renamed and patches mentioning
them can't be fixed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
Paulo Zanoni 2015-07-10 17:20:23 -03:00
parent b0427442f9
commit ca97e78455

View File

@ -98,9 +98,9 @@ struct test_mode {
* framebuffer, but on different places. This includes the offscreen * framebuffer, but on different places. This includes the offscreen
* screen. */ * screen. */
enum { enum {
FBS_SINGLE = 0, FBS_INDIVIDUAL = 0,
FBS_MULTI, FBS_SHARED,
FBS_COUNT FBS_COUNT,
} fbs; } fbs;
/* Which features are we going to test now? This is a mask! */ /* Which features are we going to test now? This is a mask! */
@ -1510,7 +1510,7 @@ static void check_test_requirements(const struct test_mode *t)
static void set_crtc_fbs(const struct test_mode *t) static void set_crtc_fbs(const struct test_mode *t)
{ {
switch (t->fbs) { switch (t->fbs) {
case FBS_SINGLE: case FBS_INDIVIDUAL:
prim_mode_params.fb.fb = &fbs.prim_pri; prim_mode_params.fb.fb = &fbs.prim_pri;
scnd_mode_params.fb.fb = &fbs.scnd_pri; scnd_mode_params.fb.fb = &fbs.scnd_pri;
offscreen_fb.fb = &fbs.offscreen; offscreen_fb.fb = &fbs.offscreen;
@ -1523,7 +1523,7 @@ static void set_crtc_fbs(const struct test_mode *t)
scnd_mode_params.fb.y = 0; scnd_mode_params.fb.y = 0;
offscreen_fb.y = 0; offscreen_fb.y = 0;
break; break;
case FBS_MULTI: case FBS_SHARED:
/* Please see the comment at the top of create_big_fb(). */ /* Please see the comment at the top of create_big_fb(). */
prim_mode_params.fb.fb = &fbs.big; prim_mode_params.fb.fb = &fbs.big;
scnd_mode_params.fb.fb = &fbs.big; scnd_mode_params.fb.fb = &fbs.big;
@ -1637,11 +1637,11 @@ static bool op_disables_psr(const struct test_mode *t,
return false; return false;
if (t->screen == SCREEN_PRIM) if (t->screen == SCREEN_PRIM)
return true; return true;
/* On FBS_MULTI, even if the target is not the PSR screen (SCREEN_PRIM), /* On FBS_SHARED, even if the target is not the PSR screen
* all primary planes share the same frontbuffer, so a write to the * (SCREEN_PRIM), all primary planes share the same frontbuffer, so a
* second screen primary plane - or offscreen plane - will touch the * write to the second screen primary plane - or offscreen plane - will
* framebuffer that's also used by the primary screen. */ * touch the framebuffer that's also used by the primary screen. */
if (t->fbs == FBS_MULTI && t->plane == PLANE_PRI) if (t->fbs == FBS_SHARED && t->plane == PLANE_PRI)
return true; return true;
return false; return false;
@ -2368,10 +2368,10 @@ static const char *plane_str(int plane)
static const char *fbs_str(int fb) static const char *fbs_str(int fb)
{ {
switch (fb) { switch (fb) {
case FBS_SINGLE: case FBS_INDIVIDUAL:
return "sfb"; return "indfb";
case FBS_MULTI: case FBS_SHARED:
return "mfb"; return "shrfb";
default: default:
igt_assert(false); igt_assert(false);
} }
@ -2446,7 +2446,7 @@ int main(int argc, char *argv[])
for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) { for (t.pipes = 0; t.pipes < PIPE_COUNT; t.pipes++) {
t.screen = SCREEN_PRIM; t.screen = SCREEN_PRIM;
t.plane = PLANE_PRI; t.plane = PLANE_PRI;
t.fbs = FBS_SINGLE; t.fbs = FBS_INDIVIDUAL;
/* Make sure nothing is using this value. */ /* Make sure nothing is using this value. */
t.method = -1; t.method = -1;
@ -2546,7 +2546,7 @@ int main(int argc, char *argv[])
TEST_MODE_ITER_BEGIN(t) TEST_MODE_ITER_BEGIN(t)
if (t.screen != SCREEN_PRIM) if (t.screen != SCREEN_PRIM)
continue; continue;
if (!opt.show_hidden && t.fbs != FBS_SINGLE) if (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL)
continue; continue;
igt_subtest_f("%s-%s-%s-%s-multidraw-%s", igt_subtest_f("%s-%s-%s-%s-multidraw-%s",
@ -2565,7 +2565,7 @@ int main(int argc, char *argv[])
continue; continue;
if (t.plane != PLANE_PRI) if (t.plane != PLANE_PRI)
continue; continue;
if (t.fbs != FBS_SINGLE) if (t.fbs != FBS_INDIVIDUAL)
continue; continue;
if (t.method != IGT_DRAW_MMAP_CPU) if (t.method != IGT_DRAW_MMAP_CPU)
continue; continue;