Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp250985ybs; Tue, 26 May 2020 08:19:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/Xqwef8sXTZifsBIJfyLLvgtqQsG09GXbI8yz75yTzpuj9QFh8q0GXWsVefqUgmcuJ2Js X-Received: by 2002:aa7:cb53:: with SMTP id w19mr2565119edt.328.1590506384185; Tue, 26 May 2020 08:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590506384; cv=none; d=google.com; s=arc-20160816; b=D/j3PTBgDfgWiVPrHcF+up9OFxD43KDWTl+1wtcHJWTIjk9I6uaWO8edaDJxDQY0VA 2AI38kV+07z4NzD1Ur/yw11quvBXrzoKOcSM+qlKdccwy1HSwNrLM2z4gJRJ/5ADGBHY b5vKksscmOBKOOScKqskwc3AejNHLHx8Va4RzGdmmAHqlCRQ0Rk39H14kRVwEnV4BChc 21q59tQYC0/3SrJ3xbng6UixIp7VgRIRiIY//wcRvlLsbafH20NSPuicxhAs5HpgQ+xt dbbFy3029i+sT1OXcCRA1JxAhyOCxfE6cwCCFcswtJjTTdRXjTS3qQZcfC9z3MNLEL4o NMTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=799GJcMpL2LNU/Tm5lFInudYnzHhcFshxvnKZptqkbM=; b=uXS6j2J+mg7Lx4PnmgLeMl/VJ4EFf4DQ+1wvVf9co8ZD9xrOdAsSiYENVZadUor54A ttCNzaoQ+tjAWqE+jVtrL9Zcq63DrrDdsvKQCIlG/c2zhIS2d5x37q5u0dg1lYEjKjAx tZhMPJNdtVWECd2Y+EtoGazABjggQ0C8XPEMAhYjkfPj6Y9Xj386gJkic06l/RDWI4PP 5k6SFCvhtSFZid3w8vh4SiLOA7IqNd8Tepzmkzn+LMhoV7MT3ciO6o3CDFZEyYGbXuN9 YIo97yDlQe2elY/wNZroT4tw/HzgY+3ef1BgbGzD+3BGIpVc0FHjOdHZ9VVcZtwPWDOk QDvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=oxdsZGrx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si72422eds.277.2020.05.26.08.19.21; Tue, 26 May 2020 08:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=oxdsZGrx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729473AbgEZPRS (ORCPT + 99 others); Tue, 26 May 2020 11:17:18 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:24236 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728088AbgEZPRR (ORCPT ); Tue, 26 May 2020 11:17:17 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04QFBuJc017743; Tue, 26 May 2020 17:16:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=799GJcMpL2LNU/Tm5lFInudYnzHhcFshxvnKZptqkbM=; b=oxdsZGrxKp0SO7XEMvJ8Yvlq8g0WKFQAg87HbE/QqERMb5eh488/eNTbrNOOUJLEXHYL sw1sp0a1SkfYe/2vG7UEfAZwPaOSFyhjaLCrJ/T2TqkEBt2g73TRIOK2N9Kiyf22HbaV rdLb35QPuV6UkPY/VkTxVMU1XuqBZxKObokv3xdNIS397Fr5O1KTaArl1Sjk2FF3Ps3D zYFGs7PvV58mjc9MePvXw8mgt3OOa09IZcFzTcUV+1HC37y2coTiqNppxUf+O9/lwQxg KGvlbBjS3ZaVbrTI+GIXwn3gJPR1G+AYDrdFUyGKxVsROhOKVMR6mPSJsjg5MRvsK3Qj Dw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 316rya8feu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 May 2020 17:16:26 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4E8E010002A; Tue, 26 May 2020 17:16:25 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 312E02C1D9F; Tue, 26 May 2020 17:16:25 +0200 (CEST) Received: from localhost (10.75.127.49) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 26 May 2020 17:16:24 +0200 From: Benjamin Gaignard To: , , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [RFC RESEND 0/3] Introduce cpufreq minimum load QoS Date: Tue, 26 May 2020 17:16:16 +0200 Message-ID: <20200526151619.8779-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG3NODE3.st.com (10.75.127.9) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-05-26_02:2020-05-26,2020-05-26 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A first round [1] of discussions and suggestions have already be done on this series but without found a solution to the problem. I resend it to progress on this topic. When start streaming from the sensor the CPU load could remain very low because almost all the capture pipeline is done in hardware (i.e. without using the CPU) and let believe to cpufreq governor that it could use lower frequencies. If the governor decides to use a too low frequency that becomes a problem when we need to acknowledge the interrupt during the blanking time. The delay to ack the interrupt and perform all the other actions before the next frame is very short and doesn't allow to the cpufreq governor to provide the required burst of power. That led to drop the half of the frames. To avoid this problem, DCMI driver informs the cpufreq governors by adding a cpufreq minimum load QoS resquest. Benjamin [1] https://lkml.org/lkml/2020/4/24/360 Benjamin Gaignard (3): PM: QoS: Introduce cpufreq minimum load QoS cpufreq: governor: Use minimum load QoS media: stm32-dcmi: Inform cpufreq governors about cpu load needs drivers/cpufreq/cpufreq_governor.c | 5 + drivers/media/platform/stm32/stm32-dcmi.c | 8 ++ include/linux/pm_qos.h | 12 ++ kernel/power/qos.c | 213 ++++++++++++++++++++++++++++++ 4 files changed, 238 insertions(+) -- 2.15.0