diff options
Diffstat (limited to 'drivers/gpu/drm/emgd/emgd/video/overlay/cmn/micro_ovl.c')
-rw-r--r-- | drivers/gpu/drm/emgd/emgd/video/overlay/cmn/micro_ovl.c | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/drivers/gpu/drm/emgd/emgd/video/overlay/cmn/micro_ovl.c b/drivers/gpu/drm/emgd/emgd/video/overlay/cmn/micro_ovl.c deleted file mode 100644 index 24c5dc9109ac..000000000000 --- a/drivers/gpu/drm/emgd/emgd/video/overlay/cmn/micro_ovl.c +++ /dev/null @@ -1,160 +0,0 @@ -/* -*- pse-c -*- - *----------------------------------------------------------------------------- - * Filename: micro_ovl.c - * $Revision: 1.10 $ - *----------------------------------------------------------------------------- - * Copyright © 2002-2010, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - * - *----------------------------------------------------------------------------- - * Description: - * - *----------------------------------------------------------------------------- - */ - -#define MODULE_NAME hal.overlay - -#include <context.h> -#include <memory.h> -#include <dsp.h> -#include <io.h> - -#include <igd_mode.h> -#include <igd_gmm.h> -//#include <igd_ovl.h> -#include <igd_pwr.h> -#include <igd_render.h> -#include <igd_blend.h> - -#include <general.h> -#include <mode_access.h> -#include <dispatch.h> -#include <intelpci.h> - -#include "ovl_dispatch.h" -#include "ovl_virt.h" - -/* - * TODO: If there is micro overlay for device dependent layer - * modify extern below to the correct micro device dispatch - * Only two micro overlay existing is for Plb and Ctg - */ - -extern ovl_dispatch_t ovl_micro_dispatch_plb[]; - -static dispatch_table_t ovl_micro_dispatch_list[] = { -/* - * TODO: Fix this. - * * This table would point the micro dispatch tables. - * For now, other than Plb ,refer the micro dispatch - * to the original table - * */ - -#ifdef CONFIG_PLB - {PCI_DEVICE_ID_VGA_PLB, &ovl_micro_dispatch_plb}, -#endif -#ifdef CONFIG_TNC - {PCI_DEVICE_ID_VGA_TNC, &ovl_micro_dispatch_plb}, -#endif - {0, NULL} -}; -extern int ovl_full_init(igd_context_t *context, igd_param_t *params,ovl_context_t *ovl_context); - -#ifndef CONFIG_MICRO_OVERLAY -#define OVL_FULL_INIT(a, b, c) ovl_full_init(a, b, c) -#else -#define OVL_FULL_INIT(a, b, c) 1 -#endif - -extern ovl_context_t ovl_context[1]; -static int igd_micro_alter_ovl(igd_display_h display_h, - igd_appcontext_h appcontext_h, - igd_surface_t *src_surf, - igd_rect_t *src_rect, - igd_rect_t *dest_rect, - igd_ovl_info_t *ovl_info, - unsigned int flags) -{ - igd_display_context_t *display = - (igd_display_context_t *)display_h; - ovl_dispatch_t *ovl_dispatch = - (ovl_dispatch_t *)ovl_context->dispatch; - - igd_display_context_t *ovl_display; - - int ret = 0; - - EMGD_TRACE_ENTER; - - ovl_display = display; - - /* Call family dependent overlay function to alter the overlay. */ - ret = ovl_dispatch->alter_ovl( - ovl_display, src_surf, src_rect, - dest_rect, ovl_info, flags); - - if (ret != IGD_SUCCESS) { - EMGD_ERROR("Error micro alter overlay\n"); - /* Turn the overlay off when there is an error */ - ovl_dispatch->alter_ovl(ovl_display, - NULL, NULL, NULL, NULL, IGD_OVL_ALTER_OFF); - } - - EMGD_TRACE_EXIT; - return ret; -} - -int _overlay_init(igd_context_t *context, igd_param_t *params) -{ - - EMGD_TRACE_ENTER; - - /* Ensure the device context pointer is valid */ - if(!context){ - EMGD_ERROR_EXIT("Error: Null context"); - return -IGD_ERROR_INVAL; - } - - /* Clear the allocated memory for overlay context */ - OS_MEMSET((void *)ovl_context, 0, sizeof(ovl_context_t)); - - /* Get overlay's dispatch table */ - ovl_context->dispatch = (ovl_dispatch_t (*)[])dispatch_acquire(context, - ovl_micro_dispatch_list); - if(!ovl_context->dispatch) { - EMGD_ERROR_EXIT("Error: Unsupported Device"); - return -IGD_ERROR_NODEV; - } - - - /* Hook up the IGD dispatch table entries for overlay - * Alter has a common function, query can call the family function - * directly */ - context->dispatch.alter_ovl = igd_micro_alter_ovl; - context->dispatch.query_ovl = NULL; - context->dispatch.query_max_size_ovl = NULL; - context->mod_dispatch.overlay_shutdown = NULL; - - if (OVL_FULL_INIT(context, params, ovl_context)) { - /* - * Even if full init failed we can still use the micro-gmm - */ - EMGD_DEBUG("Full overlay did not initialize, using micro-overlay"); - - } - - EMGD_TRACE_EXIT; - return IGD_SUCCESS; -} |