curs.c (1590700d94ac53772491ed3103a4e8b8de01640a) | curs.c (53e0a3e70de69dc9f498d26c6b5495b2771ee374) |
---|---|
1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 17 unchanged lines hidden (view full) --- 26int 27nv50_curs_new(struct nouveau_drm *drm, int head, struct nv50_wndw **pwndw) 28{ 29 struct { 30 s32 oclass; 31 int version; 32 int (*new)(struct nouveau_drm *, int, s32, struct nv50_wndw **); 33 } curses[] = { | 1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 17 unchanged lines hidden (view full) --- 26int 27nv50_curs_new(struct nouveau_drm *drm, int head, struct nv50_wndw **pwndw) 28{ 29 struct { 30 s32 oclass; 31 int version; 32 int (*new)(struct nouveau_drm *, int, s32, struct nv50_wndw **); 33 } curses[] = { |
34 { GK104_DISP_CURSOR, 0, curs507a_new }, 35 { GF110_DISP_CURSOR, 0, curs507a_new }, | 34 { GK104_DISP_CURSOR, 0, curs907a_new }, 35 { GF110_DISP_CURSOR, 0, curs907a_new }, |
36 { GT214_DISP_CURSOR, 0, curs507a_new }, 37 { G82_DISP_CURSOR, 0, curs507a_new }, 38 { NV50_DISP_CURSOR, 0, curs507a_new }, 39 {} 40 }; 41 struct nv50_disp *disp = nv50_disp(drm->dev); 42 int cid; 43 44 cid = nvif_mclass(&disp->disp->object, curses); 45 if (cid < 0) { 46 NV_ERROR(drm, "No supported cursor immediate class\n"); 47 return cid; 48 } 49 50 return curses[cid].new(drm, head, curses[cid].oclass, pwndw); 51} | 36 { GT214_DISP_CURSOR, 0, curs507a_new }, 37 { G82_DISP_CURSOR, 0, curs507a_new }, 38 { NV50_DISP_CURSOR, 0, curs507a_new }, 39 {} 40 }; 41 struct nv50_disp *disp = nv50_disp(drm->dev); 42 int cid; 43 44 cid = nvif_mclass(&disp->disp->object, curses); 45 if (cid < 0) { 46 NV_ERROR(drm, "No supported cursor immediate class\n"); 47 return cid; 48 } 49 50 return curses[cid].new(drm, head, curses[cid].oclass, pwndw); 51} |