An organic light emitting diode display panel and an electronic device is provided. Light being incident with a specific angle to an interface between a filling portion and at least one film layer causes total reflection to reduce light being incident into the film layer surrounding the inner wall of the through hole, such that an amount of light after the total reflection reached the substrate and passed through the substrate and received by the optical sensor is increased.