On Tue, Apr 2, 2013 at 7:18 PM, Christian König <deathsimple@xxxxxxxxxxx> wrote: > Just everything needed to decode videos using UVD. > > v6: just all the bugfixes and support for R7xx-SI merged in one patch > v7: UVD_CGC_GATE is a write only register, lockup detection fix > > Signed-off-by: Christian König <deathsimple@xxxxxxxxxxx> > --- <snip> > diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c > new file mode 100644 > index 0000000..8ab7bb9 > --- /dev/null > +++ b/drivers/gpu/drm/radeon/radeon_uvd.c > @@ -0,0 +1,521 @@ > +/* > + * Copyright 2011 Advanced Micro Devices, Inc. > + * All Rights Reserved. > + * > + * 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, sub license, 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 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 NON-INFRINGEMENT. IN NO EVENT SHALL > + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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. > + * > + * The above copyright notice and this permission notice (including the > + * next paragraph) shall be included in all copies or substantial portions > + * of the Software. > + * > + */ > +/* > + * Authors: > + * Christian König <deathsimple@xxxxxxxxxxx> > + */ > + > +#include <linux/firmware.h> > +#include <linux/module.h> > +#include <drm/drmP.h> > +#include <drm/drm.h> > + > +#include "radeon.h" > +#include "r600d.h" > + > +/* Firmware Names */ > +#define FIRMWARE_RV770 "radeon/RV770_uvd.bin" > +#define FIRMWARE_RV710 "radeon/RV710_uvd.bin" > +#define FIRMWARE_CYPRESS "radeon/CYPRESS_uvd.bin" > +#define FIRMWARE_SUMO "radeon/SUMO_uvd.bin" > +#define FIRMWARE_TAHITI "radeon/TAHITI_uvd.bin" > + > +MODULE_FIRMWARE(FIRMWARE_RV770); > +MODULE_FIRMWARE(FIRMWARE_RV710); > +MODULE_FIRMWARE(FIRMWARE_CYPRESS); > +MODULE_FIRMWARE(FIRMWARE_SUMO); > +MODULE_FIRMWARE(FIRMWARE_TAHITI); > + > +int radeon_uvd_init(struct radeon_device *rdev) > +{ > + struct platform_device *pdev; > + unsigned long bo_size; > + const char *fw_name; > + int i, r; > + > + pdev = platform_device_register_simple("radeon_uvd", 0, NULL, 0); > + r = IS_ERR(pdev); > + if (r) { > + dev_err(rdev->dev, "radeon_uvd: Failed to register firmware\n"); > + return -EINVAL; > + } > + > + switch (rdev->family) { > + case CHIP_RV770: > + fw_name = FIRMWARE_RV770; > + break; > + > + case CHIP_RV710: > + case CHIP_RV730: > + case CHIP_RV740: > + fw_name = FIRMWARE_RV710; > + break; > + > + case CHIP_CYPRESS: We are missing CHIP_HEMLOCK here. Alex > + case CHIP_JUNIPER: > + case CHIP_REDWOOD: > + case CHIP_CEDAR: > + fw_name = FIRMWARE_CYPRESS; > + break; > + > + case CHIP_SUMO: > + case CHIP_SUMO2: > + case CHIP_PALM: > + case CHIP_CAYMAN: > + case CHIP_BARTS: > + case CHIP_TURKS: > + case CHIP_CAICOS: > + fw_name = FIRMWARE_SUMO; > + break; > + > + case CHIP_TAHITI: > + case CHIP_VERDE: > + case CHIP_PITCAIRN: > + case CHIP_ARUBA: > + fw_name = FIRMWARE_TAHITI; > + break; > + > + default: > + return -EINVAL; > + } _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel