xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
1e3332c20SBen Skeggs /*
2e3332c20SBen Skeggs  * Copyright 2012 Maarten Lankhorst
3e3332c20SBen Skeggs  *
4e3332c20SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
5e3332c20SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
6e3332c20SBen Skeggs  * to deal in the Software without restriction, including without limitation
7e3332c20SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8e3332c20SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
9e3332c20SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
10e3332c20SBen Skeggs  *
11e3332c20SBen Skeggs  * The above copyright notice and this permission notice shall be included in
12e3332c20SBen Skeggs  * all copies or substantial portions of the Software.
13e3332c20SBen Skeggs  *
14e3332c20SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15e3332c20SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16e3332c20SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17e3332c20SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18e3332c20SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19e3332c20SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20e3332c20SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
21e3332c20SBen Skeggs  *
22e3332c20SBen Skeggs  * Authors: Maarten Lankhorst
23e3332c20SBen Skeggs  */
2453e60da4SBen Skeggs #include "priv.h"
25e3332c20SBen Skeggs 
269d498e0fSBen Skeggs #include <nvif/class.h>
27e3332c20SBen Skeggs 
2853e60da4SBen Skeggs void
gf100_mspdec_init(struct nvkm_falcon * mspdec)2953e60da4SBen Skeggs gf100_mspdec_init(struct nvkm_falcon *mspdec)
30e3332c20SBen Skeggs {
3154118c74SBen Skeggs 	struct nvkm_device *device = mspdec->engine.subdev.device;
3254118c74SBen Skeggs 	nvkm_wr32(device, 0x085010, 0x0000fff2);
3354118c74SBen Skeggs 	nvkm_wr32(device, 0x08501c, 0x0000fff2);
34e3332c20SBen Skeggs }
35e3332c20SBen Skeggs 
36a83d8872SBen Skeggs static const struct nvkm_falcon_func
3753e60da4SBen Skeggs gf100_mspdec = {
3853e60da4SBen Skeggs 	.init = gf100_mspdec_init,
399d498e0fSBen Skeggs 	.sclass = {
409d498e0fSBen Skeggs 		{ -1, -1, GF100_MSPDEC },
419d498e0fSBen Skeggs 		{}
429d498e0fSBen Skeggs 	}
43a83d8872SBen Skeggs };
44a83d8872SBen Skeggs 
4553e60da4SBen Skeggs int
gf100_mspdec_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_engine ** pengine)46*96321606SBen Skeggs gf100_mspdec_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
4753e60da4SBen Skeggs 		 struct nvkm_engine **pengine)
48e3332c20SBen Skeggs {
49*96321606SBen Skeggs 	return nvkm_mspdec_new_(&gf100_mspdec, device, type, inst, pengine);
50e3332c20SBen Skeggs }
51