2016-07-09 10:41:01 +10:00
|
|
|
/*
|
|
|
|
|
* Copyright 2015 Red Hat Inc.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
*
|
|
|
|
|
* Authors: Ben Skeggs <bskeggs@redhat.com>
|
|
|
|
|
*/
|
2022-06-01 20:46:26 +10:00
|
|
|
#include "priv.h"
|
2017-05-19 23:59:34 +10:00
|
|
|
#include "head.h"
|
2017-05-19 23:59:35 +10:00
|
|
|
#include "ior.h"
|
2022-06-01 20:46:27 +10:00
|
|
|
#include "channv50.h"
|
|
|
|
|
|
|
|
|
|
#include <nvif/class.h>
|
2016-07-09 10:41:01 +10:00
|
|
|
|
2022-06-01 20:46:26 +10:00
|
|
|
static const struct nvkm_disp_func
|
2016-07-09 10:41:01 +10:00
|
|
|
gp100_disp = {
|
2022-06-01 20:46:26 +10:00
|
|
|
.dtor = nv50_disp_dtor_,
|
|
|
|
|
.oneinit = nv50_disp_oneinit_,
|
2022-06-01 20:46:26 +10:00
|
|
|
.init = gf119_disp_init,
|
|
|
|
|
.fini = gf119_disp_fini,
|
|
|
|
|
.intr = gf119_disp_intr,
|
2016-07-09 10:41:01 +10:00
|
|
|
.intr_error = gf119_disp_intr_error,
|
2017-05-19 23:59:34 +10:00
|
|
|
.super = gf119_disp_super,
|
2022-06-01 20:46:26 +10:00
|
|
|
.uevent = &gf119_disp_chan_uevent,
|
2018-05-08 20:39:46 +10:00
|
|
|
.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
|
2020-06-04 14:22:32 +10:00
|
|
|
.sor = { .cnt = gf119_sor_cnt, .new = gp100_sor_new },
|
2022-06-01 20:46:27 +10:00
|
|
|
.root = { 0,0,GP100_DISP },
|
|
|
|
|
.user = {
|
|
|
|
|
{{0,0,GK104_DISP_CURSOR }, gf119_disp_curs_new },
|
|
|
|
|
{{0,0,GK104_DISP_OVERLAY }, gf119_disp_oimm_new },
|
|
|
|
|
{{0,0,GK110_DISP_BASE_CHANNEL_DMA }, gf119_disp_base_new },
|
|
|
|
|
{{0,0,GP100_DISP_CORE_CHANNEL_DMA }, gk104_disp_core_new },
|
|
|
|
|
{{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, gk104_disp_ovly_new },
|
|
|
|
|
{}
|
|
|
|
|
},
|
2016-07-09 10:41:01 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int
|
2021-02-04 08:35:57 +10:00
|
|
|
gp100_disp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
|
|
|
|
|
struct nvkm_disp **pdisp)
|
2016-07-09 10:41:01 +10:00
|
|
|
{
|
2021-02-04 08:35:57 +10:00
|
|
|
return nv50_disp_new_(&gp100_disp, device, type, inst, pdisp);
|
2016-07-09 10:41:01 +10:00
|
|
|
}
|