drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit
[linux-2.6-microblaze.git] / drivers / gpu / drm / nouveau / dispnv50 / headc37d.c
index 4a9a32b..9ef3c60 100644 (file)
@@ -27,17 +27,20 @@ static void
 headc37d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
 {
        struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
+       u8 depth;
        u32 *push;
+
        if ((push = evo_wait(core, 2))) {
                /*XXX: This is a dirty hack until OR depth handling is
                 *     improved later for deep colour etc.
                 */
                switch (asyh->or.depth) {
-               case 6: asyh->or.depth = 5; break;
-               case 5: asyh->or.depth = 4; break;
-               case 2: asyh->or.depth = 1; break;
-               case 0: asyh->or.depth = 4; break;
+               case 6: depth = 5; break;
+               case 5: depth = 4; break;
+               case 2: depth = 1; break;
+               case 0: depth = 4; break;
                default:
+                       depth = asyh->or.depth;
                        WARN_ON(1);
                        break;
                }