188b600d4SBen Skeggs /*
288b600d4SBen Skeggs * Copyright 2018 Red Hat Inc.
388b600d4SBen Skeggs *
488b600d4SBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a
588b600d4SBen Skeggs * copy of this software and associated documentation files (the "Software"),
688b600d4SBen Skeggs * to deal in the Software without restriction, including without limitation
788b600d4SBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense,
888b600d4SBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the
988b600d4SBen Skeggs * Software is furnished to do so, subject to the following conditions:
1088b600d4SBen Skeggs *
1188b600d4SBen Skeggs * The above copyright notice and this permission notice shall be included in
1288b600d4SBen Skeggs * all copies or substantial portions of the Software.
1388b600d4SBen Skeggs *
1488b600d4SBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1588b600d4SBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1688b600d4SBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1788b600d4SBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1888b600d4SBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1988b600d4SBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2088b600d4SBen Skeggs * OTHER DEALINGS IN THE SOFTWARE.
2188b600d4SBen Skeggs */
2288b600d4SBen Skeggs #include "base.h"
2388b600d4SBen Skeggs #include "atom.h"
2488b600d4SBen Skeggs
25*f6e0a6b0STom Rix static const u32
2688b600d4SBen Skeggs base917c_format[] = {
2788b600d4SBen Skeggs DRM_FORMAT_C8,
2888b600d4SBen Skeggs DRM_FORMAT_XRGB8888,
2988b600d4SBen Skeggs DRM_FORMAT_ARGB8888,
3088b600d4SBen Skeggs DRM_FORMAT_RGB565,
3188b600d4SBen Skeggs DRM_FORMAT_XRGB1555,
3288b600d4SBen Skeggs DRM_FORMAT_ARGB1555,
3388b600d4SBen Skeggs DRM_FORMAT_XBGR2101010,
3488b600d4SBen Skeggs DRM_FORMAT_ABGR2101010,
3588b600d4SBen Skeggs DRM_FORMAT_XBGR8888,
3688b600d4SBen Skeggs DRM_FORMAT_ABGR8888,
3788b600d4SBen Skeggs DRM_FORMAT_XRGB2101010,
3888b600d4SBen Skeggs DRM_FORMAT_ARGB2101010,
3938a72243SIlia Mirkin DRM_FORMAT_XBGR16161616F,
4038a72243SIlia Mirkin DRM_FORMAT_ABGR16161616F,
4188b600d4SBen Skeggs 0
4288b600d4SBen Skeggs };
4388b600d4SBen Skeggs
4488b600d4SBen Skeggs int
base917c_new(struct nouveau_drm * drm,int head,s32 oclass,struct nv50_wndw ** pwndw)4588b600d4SBen Skeggs base917c_new(struct nouveau_drm *drm, int head, s32 oclass,
4688b600d4SBen Skeggs struct nv50_wndw **pwndw)
4788b600d4SBen Skeggs {
4888b600d4SBen Skeggs return base507c_new_(&base907c, base917c_format, drm, head, oclass,
4988b600d4SBen Skeggs 0x00000002 << (head * 4), pwndw);
5088b600d4SBen Skeggs }
51