diff --git a/config/functions b/config/functions index f299b41a6a..035c07ba46 100644 --- a/config/functions +++ b/config/functions @@ -299,7 +299,6 @@ show_config() { config_message="$config_message\n\n Hardware decoder configuration:" config_message="$config_message\n $dashes$dashes" - config_message="$config_message\n - Broadcom CrystalHD Decoder:\t\t $CRYSTALHD" config_message="$config_message\n - XBMC Player driver:\t\t\t $XBMCPLAYER_DRIVER" config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI" config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU" diff --git a/packages/mediacenter/xbmc/package.mk b/packages/mediacenter/xbmc/package.mk index 279aa4b81c..37b2b15d64 100644 --- a/packages/mediacenter/xbmc/package.mk +++ b/packages/mediacenter/xbmc/package.mk @@ -288,13 +288,6 @@ else XBMC_VAAPI="--disable-vaapi" fi -if [ "$CRYSTALHD" = yes ]; then - PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET crystalhd" - XBMC_CRYSTALHD="--enable-crystalhd" -else - XBMC_CRYSTALHD="--disable-crystalhd" -fi - export CXX_FOR_BUILD="$HOST_CXX" export CC_FOR_BUILD="$HOST_CC" export CXXFLAGS_FOR_BUILD="$HOST_CXXFLAGS" @@ -317,7 +310,7 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \ $XBMC_OPENMAX \ $XBMC_VDPAU \ $XBMC_VAAPI \ - $XBMC_CRYSTALHD \ + --disable-crystalhd \ --disable-vtbdecoder \ --disable-tegra \ --disable-profiling \ diff --git a/packages/multimedia/crystalhd/package.mk b/packages/multimedia/crystalhd/package.mk deleted file mode 100644 index b4c8ffc03d..0000000000 --- a/packages/multimedia/crystalhd/package.mk +++ /dev/null @@ -1,62 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that 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 OpenELEC. If not, see . -################################################################################ - -PKG_NAME="crystalhd" -PKG_VERSION="3cb6786" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://git.linuxtv.org/jarod/crystalhd.git" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS_TARGET="toolchain linux" -PKG_NEED_UNPACK="$LINUX_DEPENDS" -PKG_PRIORITY="optional" -PKG_SECTION="multimedia" -PKG_SHORTDESC="crystalhd: OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator." -PKG_LONGDESC="OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator. Supported under XBMC for Mac on the AppleTV and under 10.4 and 10.5 OSX platforms." - -PKG_IS_ADDON="no" -PKG_AUTORECONF="no" - -pre_configure_target() { - cd driver/linux - autoreconf -vif -} - -configure_target() { - ./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --with-kernel-path=$(kernel_path) -} - -make_target() { - LDFLAGS="" make V=1 - - cd $ROOT/$PKG_BUILD/linux_lib/libcrystalhd - make BCGCC=$TARGET_CXX -} - -post_makeinstall_target() { - cd $ROOT/$PKG_BUILD - mkdir -p $INSTALL/usr/lib/udev/rules.d - cp driver/linux/*.rules $INSTALL/usr/lib/udev/rules.d - - mkdir -p $INSTALL/lib/modules/$(get_module_dir)/crystalhd - cp driver/linux/crystalhd.ko $INSTALL/lib/modules/$(get_module_dir)/crystalhd -} diff --git a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-crosscompiling-0.1.patch b/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-crosscompiling-0.1.patch deleted file mode 100644 index 61a1d79a00..0000000000 --- a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-crosscompiling-0.1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur crystalhd-20100118/linux_lib/libcrystalhd/Makefile crystalhd-20100118.patch/linux_lib/libcrystalhd/Makefile ---- crystalhd-20100118/linux_lib/libcrystalhd/Makefile 2010-01-07 00:08:04.000000000 +0100 -+++ crystalhd-20100118.patch/linux_lib/libcrystalhd/Makefile 2010-01-18 11:16:05.835453470 +0100 -@@ -15,7 +15,7 @@ - - ROOTDIR = ../.. - --INCLUDES = -I./ -I/usr/include -I$(ROOTDIR)/include -+INCLUDES = -I./ -I$(ROOTDIR)/include - INCLUDES += -I$(ROOTDIR)/include/link - - diff --git a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-fix_typo.patch b/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-fix_typo.patch deleted file mode 100644 index 8f8cfe4832..0000000000 --- a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-fix_typo.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur crystalhd-3cb6786/linux_lib/libcrystalhd/libcrystalhd_fwdiag_if.cpp crystalhd-3cb6786.patch/linux_lib/libcrystalhd/libcrystalhd_fwdiag_if.cpp ---- crystalhd-3cb6786/linux_lib/libcrystalhd/libcrystalhd_fwdiag_if.cpp 2012-12-08 03:31:38.000000000 +0100 -+++ crystalhd-3cb6786.patch/linux_lib/libcrystalhd/libcrystalhd_fwdiag_if.cpp 2012-12-08 04:48:46.572661023 +0100 -@@ -233,7 +233,7 @@ - - } - else -- DebugLog_Trace(LDIL_DBG,"Uart Set Sucessfully\n"); -+ DebugLog_Trace(LDIL_DBG,"Uart Set Successfully\n"); - - //START_PROCESSOR bit in DCI_CMD. - RegVal = 0; diff --git a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-lower_THRESHOLD_globals.patch b/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-lower_THRESHOLD_globals.patch deleted file mode 100644 index 8dda49dfcf..0000000000 --- a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-lower_THRESHOLD_globals.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Naur crystalhd-3cb6786/linux_lib/libcrystalhd/libcrystalhd_priv.h crystalhd-3cb6786.patch/linux_lib/libcrystalhd/libcrystalhd_priv.h ---- crystalhd-3cb6786/linux_lib/libcrystalhd/libcrystalhd_priv.h 2012-12-08 03:31:38.000000000 +0100 -+++ crystalhd-3cb6786.patch/linux_lib/libcrystalhd/libcrystalhd_priv.h 2012-12-08 04:53:46.515531561 +0100 -@@ -62,10 +62,10 @@ - BC_INPUT_MDATA_POOL_SZ_COLLECT = 256, /* Input Meta Data Pool size for collector */ - BC_MAX_SW_VOUT_BUFFS = BC_RX_LIST_CNT, /* MAX - pre allocated buffers..*/ - RX_START_DELIVERY_THRESHOLD = 0, -- PAUSE_DECODER_THRESHOLD = 12, -- RESUME_DECODER_THRESHOLD = 5, -- FLEA_RT_PD_THRESHOLD = 14, -- FLEA_RT_PU_THRESHOLD = 3, -+ PAUSE_DECODER_THRESHOLD = 6, -+ RESUME_DECODER_THRESHOLD = 3, -+ FLEA_RT_PD_THRESHOLD = 7, -+ FLEA_RT_PU_THRESHOLD = 2, - HARDWARE_INIT_RETRY_CNT = 10, - HARDWARE_INIT_RETRY_LINK_CNT = 1, - }; diff --git a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-use_8_DMA_buffers.patch b/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-use_8_DMA_buffers.patch deleted file mode 100644 index 9b0eb8b1ff..0000000000 --- a/packages/multimedia/crystalhd/patches/crystalhd-3cb6786-use_8_DMA_buffers.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur crystalhd-3cb6786/include/bc_dts_glob_lnx.h crystalhd-3cb6786.patch/include/bc_dts_glob_lnx.h ---- crystalhd-3cb6786/include/bc_dts_glob_lnx.h 2012-12-08 03:31:38.000000000 +0100 -+++ crystalhd-3cb6786.patch/include/bc_dts_glob_lnx.h 2012-12-08 04:50:12.004056345 +0100 -@@ -76,7 +76,7 @@ - BC_LINK_MAX_OPENS = 3, /* Maximum simultaneous opens*/ - BC_LINK_MAX_SGLS = 1024, /* Maximum SG elements 4M/4K */ - BC_TX_LIST_CNT = 2, /* Max Tx DMA Rings */ -- BC_RX_LIST_CNT = 16, /* Max Rx DMA Rings*/ -+ BC_RX_LIST_CNT = 8, /* Max Rx DMA Rings*/ - BC_PROC_OUTPUT_TIMEOUT = 2000, /* Milliseconds */ - BC_INFIFO_THRESHOLD = 0x10000, - }; diff --git a/packages/multimedia/crystalhd/patches/crystalhd-PW2092521.patch b/packages/multimedia/crystalhd/patches/crystalhd-PW2092521.patch deleted file mode 100644 index abd28ce231..0000000000 --- a/packages/multimedia/crystalhd/patches/crystalhd-PW2092521.patch +++ /dev/null @@ -1,565 +0,0 @@ -diff --git a/driver/linux/crystalhd_cmds.c b/driver/linux/crystalhd_cmds.c -index cecd710..ba743df 100644 ---- a/driver/linux/crystalhd_cmds.c -+++ b/driver/linux/crystalhd_cmds.c -@@ -32,6 +32,11 @@ static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx) - struct crystalhd_user *user = NULL; - int i; - -+ if (!ctx) { -+ dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ return user; -+ } -+ - for (i = 0; i < BC_LINK_MAX_OPENS; i++) { - if (!ctx->user[i].in_use) { - user = &ctx->user[i]; -@@ -46,6 +51,11 @@ int bc_get_userhandle_count(struct crystalhd_cmd *ctx) - { - int i, count = 0; - -+ if (!ctx) { -+ dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ return BC_STS_INV_ARG; -+ } -+ - for (i = 0; i < BC_LINK_MAX_OPENS; i++) { - if (ctx->user[i].in_use) - count++; -@@ -154,7 +164,7 @@ static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_ - static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -- if (!ctx || !idata) -+ if (!ctx || !ctx->hw_ctx || !idata) - return BC_STS_INV_ARG; - idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp, - idata->udata.u.regAcc.Offset); -@@ -164,7 +174,7 @@ static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx, - static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -- if (!ctx || !idata) -+ if (!ctx || !ctx->hw_ctx || !idata) - return BC_STS_INV_ARG; - - ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset, -@@ -176,7 +186,7 @@ static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx, - static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -- if (!ctx || !idata) -+ if (!ctx || !ctx->hw_ctx || !idata) - return BC_STS_INV_ARG; - - idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp, -@@ -187,7 +197,7 @@ static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx, - static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -- if (!ctx || !idata) -+ if (!ctx || !ctx->hw_ctx || !idata) - return BC_STS_INV_ARG; - - ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset, -@@ -201,7 +211,7 @@ static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx, - { - BC_STATUS sts = BC_STS_SUCCESS; - -- if (!ctx || !idata || !idata->add_cdata) -+ if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata) - return BC_STS_INV_ARG; - - if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) { -@@ -220,7 +230,7 @@ static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx, - { - BC_STATUS sts = BC_STS_SUCCESS; - -- if (!ctx || !idata || !idata->add_cdata) -+ if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata) - return BC_STS_INV_ARG; - - if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) { -@@ -307,7 +317,7 @@ static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx, - - dev_dbg(chddev(), "Downloading FW\n"); - -- if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) { -+ if (!ctx || !ctx->hw_ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) { - dev_err(chddev(), "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } -@@ -350,7 +360,7 @@ static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_d - BC_STATUS sts; - uint32_t *cmd; - -- if (!(ctx->state & BC_LINK_INIT)) { -+ if ( !ctx || !idata || !(ctx->state & BC_LINK_INIT) || !ctx->hw_ctx) { - dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state); - return BC_STS_ERR_USAGE; - } -@@ -395,7 +405,7 @@ static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd, - return; - } - if (sts == BC_STS_IO_USER_ABORT || sts == BC_STS_PWR_MGMT) -- return; -+ return; - - dio_hnd->uinfo.comp_sts = sts; - dio_hnd->uinfo.ev_sts = 1; -@@ -407,6 +417,9 @@ static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx) - wait_queue_head_t sleep_ev; - int rc = 0; - -+ if (!ctx) -+ return BC_STS_INV_ARG; -+ - if (ctx->state & BC_LINK_SUSPEND) - return BC_STS_PWR_MGMT; - -@@ -432,7 +445,7 @@ static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx, - wait_queue_head_t event; - int rc = 0; - -- if (!ctx || !idata || !dio) { -+ if (!ctx || !ctx->hw_ctx || !idata || !dio) { - dev_err(dev, "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } -@@ -573,7 +586,7 @@ static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx, - struct crystalhd_dio_req *dio_hnd = NULL; - BC_STATUS sts = BC_STS_SUCCESS; - -- if (!ctx || !idata) { -+ if (!ctx || !ctx->hw_ctx || !idata) { - dev_err(dev, "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } -@@ -612,6 +625,11 @@ static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx, - { - BC_STATUS sts = BC_STS_SUCCESS; - -+ if (!ctx || !dio) { -+ dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ return BC_STS_INV_ARG; -+ } -+ - sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio, 0); - if (sts != BC_STS_SUCCESS) - return sts; -@@ -673,6 +691,10 @@ static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx, - static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -+ if (!ctx || !ctx->hw_ctx || !idata) { -+ return BC_STS_INV_ARG; -+ } -+ - ctx->state |= BC_LINK_CAP_EN; - - if( idata->udata.u.RxCap.PauseThsh ) -@@ -705,7 +727,7 @@ static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx, - struct device *dev = chddev(); - struct crystalhd_rx_dma_pkt *rpkt; - -- if (!ctx || !idata) { -+ if (!ctx || !ctx->hw_ctx || !idata) { - dev_err(dev, "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } -@@ -745,8 +767,8 @@ static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx, - bool readTxOnly = false; - unsigned long irqflags; - -- if (!ctx || !idata) { -- dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ if (!ctx || !ctx->hw_ctx || !idata) { -+ dev_err(chddev(), "%s: Invalid Arg ctx,hw,data: 0x%lx 0x%lx 0x%lx\n", __func__, (uintptr_t)(ctx->hw_ctx), (uintptr_t)ctx, (uintptr_t)idata); - return BC_STS_INV_ARG; - } - -@@ -828,6 +850,10 @@ get_out: - static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx, - crystalhd_ioctl_data *idata) - { -+ if (!ctx || !ctx->hw_ctx || !idata) { -+ dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ return BC_STS_INV_ARG; -+ } - crystalhd_hw_stats(ctx->hw_ctx, NULL); - - return BC_STS_SUCCESS; -@@ -948,9 +974,9 @@ BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *ida - BC_STATUS sts = BC_STS_SUCCESS; - struct crystalhd_rx_dma_pkt *rpkt = NULL; - -- if (!ctx || !idata) { -- dev_err(dev, "Invalid Parameters\n"); -- return BC_STS_ERROR; -+ if (!ctx || !ctx->hw_ctx || !idata) { -+ dev_err(dev, "%s: Invalid Arg\n", __func__); -+ return BC_STS_INV_ARG; - } - - if (ctx->state & BC_LINK_SUSPEND) -@@ -1017,6 +1043,11 @@ BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx) - { - BC_STATUS sts = BC_STS_SUCCESS; - -+ if (!ctx) { -+ dev_err(chddev(), "%s: Invalid Arg\n", __func__); -+ return BC_STS_INV_ARG; -+ } -+ - sts = crystalhd_hw_resume(ctx->hw_ctx); - if (sts != BC_STS_SUCCESS) - return sts; -@@ -1049,13 +1080,13 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, - struct crystalhd_user *uc; - - if (!ctx || !user_ctx) { -- dev_err(dev, "Invalid arg..\n"); -+ dev_err(dev, "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } - - uc = bc_cproc_get_uid(ctx); - if (!uc) { -- dev_info(dev, "No free user context...\n"); -+ dev_info(dev, "%s No free user context.\n", __func__); - return BC_STS_BUSY; - } - -@@ -1093,19 +1124,21 @@ BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, - * - * Called at the time of driver load. - */ --BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, -+BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, - struct crystalhd_adp *adp) - { -- struct device *dev = &adp->pdev->dev; -+ struct device *dev; - int i = 0; - -- if (!ctx || !adp) { -- dev_err(dev, "%s: Invalid arg\n", __func__); -+ if (!ctx || !adp || !adp->pdev) { -+ printk(KERN_ERR "%s: Invalid arg.\n", __func__); - return BC_STS_INV_ARG; - } - -+ dev = &adp->pdev->dev; -+ - if (ctx->adp) -- dev_dbg(dev, "Resetting Cmd context delete missing..\n"); -+ dev_dbg(dev, "Resetting Cmd context delete missing.\n"); - - ctx->adp = adp; - for (i = 0; i < BC_LINK_MAX_OPENS; i++) { -@@ -1114,15 +1147,19 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, - ctx->user[i].mode = DTS_MODE_INV; - } - -- ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL); -- -- memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw)); -+ if(ctx->hw_ctx == NULL) { -+ ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL); -+ if(ctx->hw_ctx != NULL) -+ memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw)); -+ else -+ return BC_STS_ERROR; - -- /*Open and Close the Hardware to put it in to sleep state*/ -- crystalhd_hw_open(ctx->hw_ctx, ctx->adp); -- crystalhd_hw_close(ctx->hw_ctx, ctx->adp); -- kfree(ctx->hw_ctx); -- ctx->hw_ctx = NULL; -+ /*Open and Close the Hardware to put it in to sleep state*/ -+ crystalhd_hw_open(ctx->hw_ctx, ctx->adp); -+ crystalhd_hw_close(ctx->hw_ctx, ctx->adp); -+ kfree(ctx->hw_ctx); -+ ctx->hw_ctx = NULL; -+ } - - return BC_STS_SUCCESS; - } -@@ -1136,10 +1173,15 @@ BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, - * - * Called at the time of driver un-load. - */ --BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx) -+BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx) - { - dev_dbg(chddev(), "Deleting Command context..\n"); - -+ if (!ctx) { -+ dev_err(chddev(), "%s: Invalid arg\n", __func__); -+ return BC_STS_INV_ARG; -+ } -+ - ctx->adp = NULL; - - return BC_STS_SUCCESS; -@@ -1165,8 +1207,8 @@ crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cm - crystalhd_cmd_proc cproc = NULL; - unsigned int i, tbl_sz; - -- if (!ctx) { -- dev_err(dev, "Invalid arg.. Cmd[%d]\n", cmd); -+ if (!ctx || !uc) { -+ dev_err(dev, "Invalid arg. Cmd[%d]\n", cmd); - return NULL; - } - -diff --git a/driver/linux/crystalhd_fleafuncs.c b/driver/linux/crystalhd_fleafuncs.c -index 1aa7115..f76d122 100644 ---- a/driver/linux/crystalhd_fleafuncs.c -+++ b/driver/linux/crystalhd_fleafuncs.c -@@ -1344,7 +1344,9 @@ BCHP_SCRUB_CTRL_BI_CMAC_127_96 0x000f6018 CMAC Bits[127:96] - bool crystalhd_flea_start_device(struct crystalhd_hw *hw) - { - uint32_t regVal = 0; -- bool bRetVal = false; -+ -+ if (!hw) -+ return false; - - /* - -- Issue Core reset to bring in the default values in place -@@ -1430,7 +1432,7 @@ bool crystalhd_flea_start_device(struct crystalhd_hw *hw) - - msleep_interruptible(1); - -- return bRetVal; -+ return true; - } - - -diff --git a/driver/linux/crystalhd_hw.c b/driver/linux/crystalhd_hw.c -index cf8fefb..bffb468 100644 ---- a/driver/linux/crystalhd_hw.c -+++ b/driver/linux/crystalhd_hw.c -@@ -38,7 +38,7 @@ - BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp) - { - struct device *dev; -- if (!hw || !adp) { -+ if (!hw || !adp || !adp->pdev) { - printk(KERN_ERR "%s: Invalid Arguments\n", __func__); - return BC_STS_INV_ARG; - } -@@ -110,7 +110,10 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp) - hw->rx_pkt_tag_seed = 0x70029070; - - hw->stop_pending = 0; -- hw->pfnStartDevice(hw); -+ if (!hw->pfnStartDevice(hw)) { -+ printk(KERN_ERR "%s: Failed to Start Device! \n", __func__); -+ return BC_STS_ERROR; -+ } - hw->dev_started = true; - - dev_dbg(dev, "Opening HW. hw:0x%lx, hw->adp:0x%lx\n", -@@ -121,9 +124,9 @@ BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp) - - BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp) - { -- if (!hw) { -+ if (!hw || !adp) { - printk(KERN_ERR "%s: Invalid Arguments\n", __func__); -- return BC_STS_SUCCESS; -+ return BC_STS_INV_ARG; - } - - if (!hw->dev_started) -@@ -390,12 +393,12 @@ BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw, - struct tx_dma_pkt *tx_req; - - if (!hw || !list_id) { -- printk(KERN_ERR "%s: Invalid Arg!!\n", __func__); -+ printk(KERN_ERR "%s: Invalid Arg\n", __func__); - return BC_STS_INV_ARG; - } - - tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(hw->tx_actq, list_id); -- if (!tx_req) { -+ if (!tx_req || !tx_req->dio_req || !tx_req->cb_event) { - if (cs != BC_STS_IO_USER_ABORT) - dev_err(&hw->adp->pdev->dev, "Find/Fetch: no req!\n"); - return BC_STS_NO_DATA; -@@ -1047,8 +1050,8 @@ BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw) - hw->rx_list_post_index = 0; - hw->tx_list_post_index = 0; - -- if (hw->pfnStartDevice(hw)) { -- dev_info(&hw->adp->pdev->dev, "Failed to Start Device!!\n"); -+ if (!hw->pfnStartDevice(hw)) { -+ dev_info(&hw->adp->pdev->dev, "Failed to resume start device!\n"); - return BC_STS_ERROR; - } - -diff --git a/driver/linux/crystalhd_linkfuncs.c b/driver/linux/crystalhd_linkfuncs.c -index 8366cc3..c8be3ab 100644 ---- a/driver/linux/crystalhd_linkfuncs.c -+++ b/driver/linux/crystalhd_linkfuncs.c -@@ -469,8 +469,8 @@ bool crystalhd_link_start_device(struct crystalhd_hw *hw) - uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0; - struct device *dev; - -- if (!hw) -- return -EINVAL; -+ if (!hw || !hw->adp || !hw->adp->pdev) -+ return false; - - dev = &hw->adp->pdev->dev; - -@@ -957,6 +957,9 @@ void crystalhd_link_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts) - { - uint32_t err_sts; - -+ if (!hw) -+ return; -+ - if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK) - crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0, - BC_STS_SUCCESS); -@@ -1995,22 +1998,15 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta - { - uint32_t intr_sts = 0; - uint32_t deco_intr = 0; -- bool rc = false; - -- if (!adp || !hw->dev_started) -- return rc; -+ if (!adp || !hw || !hw->dev_started) -+ return false; - - hw->stats.num_interrupts++; - - deco_intr = hw->pfnReadDevRegister(hw->adp, Stream2Host_Intr_Sts); - intr_sts = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_STATUS); - -- if (intr_sts) { -- /* let system know we processed interrupt..*/ -- rc = true; -- hw->stats.dev_interrupts++; -- } -- - if (deco_intr && (deco_intr != 0xdeaddead)) { - - if (deco_intr & 0x80000000) { -@@ -2026,7 +2022,6 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta - - hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, deco_intr); - hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, 0); -- rc = 1; - } - - /* Rx interrupts */ -@@ -2036,14 +2031,17 @@ bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crysta - crystalhd_link_tx_isr(hw, intr_sts); - - /* Clear interrupts */ -- if (rc) { -- if (intr_sts) -- hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts); -+ if (intr_sts) -+ hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts); - -- hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1); -+ hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1); -+ -+ if (intr_sts) { -+ /* Let system know we have processed interrupts, and rc ret is always true unless invalid args. */ -+ hw->stats.dev_interrupts++; - } - -- return rc; -+ return true; - } - - /* Dummy private function */ -diff --git a/driver/linux/crystalhd_lnx.c b/driver/linux/crystalhd_lnx.c -index 64e66ad..8608aea 100644 ---- a/driver/linux/crystalhd_lnx.c -+++ b/driver/linux/crystalhd_lnx.c -@@ -431,7 +431,7 @@ static const struct file_operations chd_dec_fops = { - .llseek = noop_llseek, - }; - --static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp) -+static int chd_dec_init_chdev(struct crystalhd_adp *adp) - { - struct device *xdev = &adp->pdev->dev; - struct device *dev; -@@ -498,7 +498,7 @@ fail: - return rc; - } - --static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp) -+static void chd_dec_release_chdev(struct crystalhd_adp *adp) - { - crystalhd_ioctl_data *temp = NULL; - if (!adp) -@@ -523,7 +523,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp) - /*crystalhd_delete_elem_pool(adp); */ - } - --static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo) -+static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo) - { - struct device *dev = &pinfo->pdev->dev; - int rc; -@@ -582,7 +582,7 @@ static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo) - return 0; - } - --static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo) -+static void chd_pci_release_mem(struct crystalhd_adp *pinfo) - { - if (!pinfo) - return; -@@ -597,7 +597,7 @@ static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo) - } - - --static void __devexit chd_dec_pci_remove(struct pci_dev *pdev) -+static void chd_dec_pci_remove(struct pci_dev *pdev) - { - struct crystalhd_adp *pinfo; - BC_STATUS sts = BC_STS_SUCCESS; -@@ -625,7 +625,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev) - g_adp_info = NULL; - } - --static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, -+static int chd_dec_pci_probe(struct pci_dev *pdev, - const struct pci_device_id *entry) - { - struct device *dev = &pdev->dev; -@@ -815,7 +815,7 @@ MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table); - static struct pci_driver bc_chd_driver = { - .name = "crystalhd", - .probe = chd_dec_pci_probe, -- .remove = __devexit_p(chd_dec_pci_remove), -+ .remove = chd_dec_pci_remove, - .id_table = chd_dec_pci_id_table, - .suspend = chd_dec_pci_suspend, - .resume = chd_dec_pci_resume -diff --git a/driver/linux/crystalhd_misc.c b/driver/linux/crystalhd_misc.c -index 410ab9d..56fbb51 100644 ---- a/driver/linux/crystalhd_misc.c -+++ b/driver/linux/crystalhd_misc.c -@@ -512,8 +512,8 @@ void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint3 - if(down_interruptible(&hw->fetch_sem)) - goto sem_error; - r_pkt = crystalhd_dioq_fetch(ioq); -- /* If format change packet, then return with out checking anything */ -- if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE)) -+ /* If format change packet then return without checking anything */ -+ if (!r_pkt || r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE)) - goto sem_rel_return; - if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) { - picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt); diff --git a/projects/Cuboxi/options b/projects/Cuboxi/options index f752761ad0..4773279028 100644 --- a/projects/Cuboxi/options +++ b/projects/Cuboxi/options @@ -269,10 +269,6 @@ # Use VAAPI video acceleration (needs intel i965 driver and a supported card) VAAPI="no" -# Use Broadcom CrystalHD Decoder Card for video acceleration -# (needs Kernelsupport for Broadcom Decoder Card and a supported card) - CRYSTALHD="no" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes" diff --git a/projects/Generic/options b/projects/Generic/options index a5f2de4fb8..d84c85102f 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -274,10 +274,6 @@ # Use VAAPI video acceleration (needs intel i965 driver and a supported card) VAAPI="yes" -# Use Broadcom CrystalHD Decoder Card for video acceleration -# (needs Kernelsupport for Broadcom Decoder Card and a supported card) - CRYSTALHD="yes" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes" diff --git a/projects/RPi/options b/projects/RPi/options index 14e32df350..aa408f204a 100644 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -269,10 +269,6 @@ # Use VAAPI video acceleration (needs intel i965 driver and a supported card) VAAPI="no" -# Use Broadcom CrystalHD Decoder Card for video acceleration -# (needs Kernelsupport for Broadcom Decoder Card and a supported card) - CRYSTALHD="no" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes"