Return-Path: Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=jae.hyun.yoo@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45946Q7533zDqWc for ; Fri, 24 May 2019 08:33:50 +1000 (AEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2019 15:33:46 -0700 X-ExtLoop1: 1 Received: from maru.jf.intel.com ([10.54.51.75]) by fmsmga008.fm.intel.com with ESMTP; 23 May 2019 15:33:45 -0700 From: Jae Hyun Yoo To: Eddie James , Joel Stanley , Andrew Jeffery Cc: openbmc@lists.ozlabs.org, Jae Hyun Yoo Subject: [PATCH dev-5.1 1/4] media: aspeed: remove source buffer allocation before mode detection Date: Thu, 23 May 2019 15:33:26 -0700 Message-Id: <20190523223329.6408-2-jae.hyun.yoo@linux.intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523223329.6408-1-jae.hyun.yoo@linux.intel.com> References: <20190523223329.6408-1-jae.hyun.yoo@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 May 2019 22:33:51 -0000 Mode detection doesn't require source buffer allocation so this commit removes that. Signed-off-by: Jae Hyun Yoo --- drivers/media/platform/aspeed-video.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c index 1bb863b32836..ee1f87a08c7c 100644 --- a/drivers/media/platform/aspeed-video.c +++ b/drivers/media/platform/aspeed-video.c @@ -733,27 +733,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video) det->height = MIN_HEIGHT; video->v4l2_input_status = V4L2_IN_ST_NO_SIGNAL; - /* - * Since we need max buffer size for detection, free the second source - * buffer first. - */ - if (video->srcs[1].size) - aspeed_video_free_buf(video, &video->srcs[1]); - - if (video->srcs[0].size < VE_MAX_SRC_BUFFER_SIZE) { - if (video->srcs[0].size) - aspeed_video_free_buf(video, &video->srcs[0]); - - if (!aspeed_video_alloc_buf(video, &video->srcs[0], - VE_MAX_SRC_BUFFER_SIZE)) { - dev_err(video->dev, - "Failed to allocate source buffers\n"); - return; - } - } - - aspeed_video_write(video, VE_SRC0_ADDR, video->srcs[0].dma); - do { if (tries) { set_current_state(TASK_INTERRUPTIBLE); -- 2.21.0