xref: /linux/drivers/gpu/drm/nouveau/dispnv50/ovly917e.c (revision 2ce7f38629891eeaf3e5d406add102a3fa6f6632)
1*2ce7f386SBen Skeggs /*
2*2ce7f386SBen Skeggs  * Copyright 2018 Red Hat Inc.
3*2ce7f386SBen Skeggs  *
4*2ce7f386SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
5*2ce7f386SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
6*2ce7f386SBen Skeggs  * to deal in the Software without restriction, including without limitation
7*2ce7f386SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*2ce7f386SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
9*2ce7f386SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
10*2ce7f386SBen Skeggs  *
11*2ce7f386SBen Skeggs  * The above copyright notice and this permission notice shall be included in
12*2ce7f386SBen Skeggs  * all copies or substantial portions of the Software.
13*2ce7f386SBen Skeggs  *
14*2ce7f386SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*2ce7f386SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*2ce7f386SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*2ce7f386SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*2ce7f386SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*2ce7f386SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*2ce7f386SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
21*2ce7f386SBen Skeggs  */
22*2ce7f386SBen Skeggs #include "ovly.h"
23*2ce7f386SBen Skeggs 
24*2ce7f386SBen Skeggs static const u32
25*2ce7f386SBen Skeggs ovly917e_format[] = {
26*2ce7f386SBen Skeggs 	DRM_FORMAT_YUYV,
27*2ce7f386SBen Skeggs 	DRM_FORMAT_UYVY,
28*2ce7f386SBen Skeggs 	DRM_FORMAT_XRGB8888,
29*2ce7f386SBen Skeggs 	DRM_FORMAT_ARGB8888,
30*2ce7f386SBen Skeggs 	DRM_FORMAT_XRGB1555,
31*2ce7f386SBen Skeggs 	DRM_FORMAT_ARGB1555,
32*2ce7f386SBen Skeggs 	DRM_FORMAT_XBGR2101010,
33*2ce7f386SBen Skeggs 	DRM_FORMAT_ABGR2101010,
34*2ce7f386SBen Skeggs 	DRM_FORMAT_XRGB2101010,
35*2ce7f386SBen Skeggs 	DRM_FORMAT_ARGB2101010,
36*2ce7f386SBen Skeggs 	0
37*2ce7f386SBen Skeggs };
38*2ce7f386SBen Skeggs 
39*2ce7f386SBen Skeggs int
40*2ce7f386SBen Skeggs ovly917e_new(struct nouveau_drm *drm, int head, s32 oclass,
41*2ce7f386SBen Skeggs 	     struct nv50_wndw **pwndw)
42*2ce7f386SBen Skeggs {
43*2ce7f386SBen Skeggs 	return ovly507e_new_(&ovly907e, ovly917e_format, drm, head, oclass,
44*2ce7f386SBen Skeggs 			     0x00000004 << (head * 4), pwndw);
45*2ce7f386SBen Skeggs }
46